<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


  
    
    <title>YAML&nbsp;Ain’t&nbsp;Markup&nbsp;Language&nbsp;(YAML™) Version&nbsp;1.2</title>
    
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
  <script src="untitled" type="text/javascript"></script><script src="default+zh_cn.i.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="index.css" media="all">
</head>
<body>
    <div class="book" xml:lang="en" lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h1 class="title"><a id="id2656258"></a>
      YAML&nbsp;Ain’t&nbsp;Markup&nbsp;Language&nbsp;(<span class="trademark">YAML</span>™)
      Version&nbsp;1.2
    </h1>
          </div>
          <div>
            <h2 class="subtitle">
      3<sup>rd</sup>&nbsp;Edition,&nbsp;Patched&nbsp;at&nbsp;2009-10-01
    </h2>
          </div>
          <div>
            <div class="authorgroup">
              <div class="author">
                <h3 class="author"><span class="firstname">Oren</span> <span class="surname">Ben-Kiki</span></h3>
                <code class="email">&lt;<a class="email" href="mailto:oren@ben-kiki.org">oren@ben-kiki.org</a>&gt;</code>
              </div>
              <div class="author">
                <h3 class="author"><span class="firstname">Clark</span> <span class="surname">Evans</span></h3>
                <code class="email">&lt;<a class="email" href="mailto:cce@clarkevans.com">cce@clarkevans.com</a>&gt;</code>
              </div>
              <div class="author">
                <h3 class="author"><span class="firstname">Ingy</span> <span class="surname">döt Net</span></h3>
                <code class="email">&lt;<a class="email" href="mailto:ingy@ingy.net">ingy@ingy.net</a>&gt;</code>
              </div>
              <div class="mediaobject">
              </div>
            </div>
          </div>
          <div>
            <p class="releaseinfo">
      <span class="emphasis"><em>Latest (patched) version:</em></span><br>
      &nbsp;&nbsp;HTML:
      <a class="ulink" href="http://yaml.org/spec/1.2/spec.html" target="_top">http://yaml.org/spec/1.2/spec.html</a><br>
      &nbsp;&nbsp;PDF:
      <a class="ulink" href="http://yaml.org/spec/1.2/spec.pdf" target="_top">http://yaml.org/spec/1.2/spec.pdf</a><br>
      &nbsp;&nbsp;PS:
      <a class="ulink" href="http://yaml.org/spec/1.2/spec.ps" target="_top">http://yaml.org/spec/1.2/spec.ps</a><br>
      &nbsp;&nbsp;Errata:
      <a class="ulink" href="http://yaml.org/spec/1.2/errata.html" target="_top">http://yaml.org/spec/1.2/errata.html</a><br>
      <span class="emphasis"><em>Previous (original) version:</em></span>
      <a class="ulink" href="http://yaml.org/spec/1.2/2009-07-21/spec.html" target="_top">http://yaml.org/spec/1.2/2009-07-21/spec.html</a><br>
    </p>
          </div>
          <div>
            <p class="copyright">Copyright © 2001-2009 Oren Ben-Kiki, Clark Evans, Ingy döt Net</p>
          </div>
          <div>
            <div class="legalnotice"><a id="id2709007"></a>
      This document may be freely copied, provided it is not modified.
    </div>
          </div>
          <div>
            <div class="abstract">
              <p class="title">
                <b>Status of this Document</b>
              </p>
              <p>
        This document reflects the third version of YAML data serialization
        language. The content of the specification was arrived at by consensus
        of its authors and through user feedback on the <a class="ulink" href="http://lists.sourceforge.net/lists/listinfo/yaml-core" target="_top">yaml-core</a>
        mailing list. We encourage implementers to please update their software
        with support for this version.
      </p>
              <p>
        The primary objective of this revision is to bring YAML into compliance
        with JSON as an official subset. YAML 1.2 is compatible with 1.1 for
        most practical applications - this is a minor revision. An expected
        source of incompatibility with prior versions of YAML, especially the
        syck implementation, is the change in implicit typing rules. We have
        removed unique implicit typing rules and have updated these rules to
        align them with JSON's productions. In this version of YAML, boolean
        values may be serialized as “<span class="quote"><strong class="userinput"><code>true</code></strong></span>” or
        “<span class="quote"><strong class="userinput"><code>false</code></strong></span>”; the empty scalar as “<span class="quote"><strong class="userinput"><code>null</code></strong></span>”.
        Unquoted numeric values are a superset of JSON's numeric production.
        Other changes in the specification were the removal of the Unicode line
        breaks and production bug fixes. We also define 3 built-in implicit
        typing rule sets: untyped, strict JSON, and a more flexible YAML rule
        set that extends JSON typing.
      </p>
              <p>
        The difference between late 1.0 drafts which syck 0.55 implements and
        the 1.1 revision of this specification is much more extensive. We fixed
        usability issues with the tagging syntax. In particular, the single
        exclamation was re-defined for private types and a simple prefixing
        mechanism was introduced. This revision also fixed many production edge
        cases and introduced a type repository. Therefore, there are several
        incompatibilities between syck and this revision as well.
      </p>
              <p>
        The list of known errors in this specification is available at <a class="ulink" href="http://yaml.org/spec/1.2/errata.html" target="_top">http://yaml.org/spec/1.2/errata.html</a>.
        Please report errors in this document to the <a class="ulink" href="http://www.yaml.org/spec/1.2/spec.html" target="_top">
        yaml-core</a> mailing list. This revision contains fixes for all
        errors known as of 2009-10-01.
      </p>
              <p>
        We wish to thank implementers who have tirelessly tracked earlier
        versions of this specification, and our fabulous user community whose
        feedback has both validated and clarified our direction.
      </p>
            </div>
          </div>
          <div>
            <div class="abstract">
              <p class="title">
                <b>Abstract</b>
              </p>
              <p>
        <span class="trademark">YAML</span>™ (rhymes with “<span class="quote">camel</span>”) is a
        human-friendly, cross language, Unicode based data serialization
        language designed around the common native data types of agile
        programming languages. It is broadly useful for programming needs
        ranging from configuration files to Internet messaging to object
        persistence to data auditing. Together with the <a class="ulink" href="http://www.unicode.org/" target="_top">Unicode standard for characters</a>,
        this specification provides all the information necessary to understand
        YAML Version 1.2 and to create programs that process YAML information.
      </p>
            </div>
          </div>
        </div>
        <hr>
      </div>
      <div class="toc">
        <p>
          <b>Table of Contents</b>
        </p>
        <dl>
          <dt>
            <span class="chapter">
              <a href="#Introduction">1. Introduction</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2708649">1.1. Goals</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2708710">1.2. Prior Art</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2759572">1.3. Relation to JSON</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2759732">1.4. Relation to XML</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2759768">1.5. Terminology</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Preview">2. Preview</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2759963">2.1. Collections</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2760395">2.2. Structures</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2760844">2.3. Scalars</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2761292">2.4. Tags</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2761803">2.5. Full Length Example</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Processing">3. Processing YAML Information</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2762107">3.1. Processes</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2762313">3.1.1. Dump</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2763035">3.1.2. Load</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2763452">3.2. Information Models</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2763754">3.2.1. Representation Graph</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2764044">3.2.1.1. Nodes</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2764295">3.2.1.2. Tags</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2764652">3.2.1.3. Node Comparison</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                  <dt>
                    <span class="sect2">
                      <a href="#id2765410">3.2.2. Serialization Tree</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2765608">3.2.2.1. Keys Order</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2765878">3.2.2.2. Anchors and Aliases</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                  <dt>
                    <span class="sect2">
                      <a href="#id2766150">3.2.3. Presentation Stream</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2766446">3.2.3.1. Node Styles</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2766934">3.2.3.2. Scalar Formats</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2767100">3.2.3.3. Comments</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2767222">3.2.3.4. Directives</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2767381">3.3. Loading Failure Points</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2767852">3.3.1. Well-Formed Streams and Identified Aliases</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2768011">3.3.2. Resolved Tags</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2769212">3.3.3. Recognized and Valid Tags</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2769542">3.3.4. Available Tags</a>
                    </span>
                  </dt>
                </dl>
              </dd>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Syntax">4. Syntax Conventions</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2769866">4.1. Production Parameters</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2770517">4.2. Production Naming Conventions</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Characters">5. Characters</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2770814">5.1. Character Set</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2771184">5.2. Character Encodings</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2772075">5.3. Indicator Characters</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2774608">5.4. Line Break Characters</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2775170">5.5. White Space Characters</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2775468">5.6. Miscellaneous Characters</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2776092">5.7. Escaped Characters</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Basic">6. Basic Structures</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2777534">6.1. Indentation Spaces</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2778241">6.2. Separation Spaces</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2778481">6.3. Line Prefixes</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2778853">6.4. Empty Lines</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2779048">6.5. Line Folding</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2780069">6.6. Comments</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2780810">6.7. Separation Lines</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2781147">6.8. Directives</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2781553">6.8.1. “<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>” Directives</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2782090">6.8.2. “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” Directives</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2782457">6.8.2.1. Tag Handles</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2783273">6.8.2.2. Tag Prefixes</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2783797">6.9. Node Properties</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2784064">6.9.1. Node Tags</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2785586">6.9.2. Node Anchors</a>
                    </span>
                  </dt>
                </dl>
              </dd>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Flow">7. Flow Styles</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2786196">7.1. Alias Nodes</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2786563">7.2. Empty Nodes</a>
                </span>
              </dt>
              <dt>
                <span class="sect1">
                  <a href="#id2786942">7.3. Flow Scalar Styles</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2787109">7.3.1. Double-Quoted Style</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2788097">7.3.2. Single-Quoted Style</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2788859">7.3.3. Plain Style</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2790088">7.4. Flow Collection Styles</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2790320">7.4.1. Flow Sequences</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2790832">7.4.2. Flow Mappings</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2792977">7.5. Flow Nodes</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Block">8. Block Styles</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2793652">8.1. Block Scalar Styles</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2793718">8.1.1. Block Scalar Headers</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2793979">8.1.1.1. Block Indentation Indicator</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2794534">8.1.1.2. Block Chomping Indicator</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                  <dt>
                    <span class="sect2">
                      <a href="#id2795688">8.1.2. Literal Style</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2796251">8.1.3. Folded Style</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2797293">8.2. Block Collection Styles</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2797382">8.2.1. Block Sequences</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2798057">8.2.2. Block Mappings</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2799181">8.2.3. Block Nodes</a>
                    </span>
                  </dt>
                </dl>
              </dd>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#YAML">9. YAML Character Stream</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2800132">9.1. Documents</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2800168">9.1.1. Document Prefix</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2800401">9.1.2. Document Markers</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2800967">9.1.3. Bare Documents</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2801301">9.1.4. Explicit Documents</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2801522">9.1.5. Directives Documents</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2801681">9.2. Streams</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="chapter">
              <a href="#Schema">10. Recommended Schemas</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect1">
                  <a href="#id2802346">10.1. Failsafe Schema</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2802427">10.1.1. Tags</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2802432">10.1.1.1. <em class="firstterm"></em>Generic Mapping</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2802662">10.1.1.2. <em class="firstterm"></em>Generic Sequence</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2802842">10.1.1.3. <em class="firstterm"></em>Generic String</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                  <dt>
                    <span class="sect2">
                      <a href="#id2803036">10.1.2. Tag Resolution</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2803231">10.2. JSON Schema</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2803311">10.2.1. Tags</a>
                    </span>
                  </dt>
                  <dd>
                    <dl>
                      <dt>
                        <span class="sect3">
                          <a href="#id2803362">10.2.1.1. <em class="firstterm"></em>Null</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2803629">10.2.1.2. <em class="firstterm"></em>Boolean</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2803828">10.2.1.3. <em class="firstterm"></em>Integer</a>
                        </span>
                      </dt>
                      <dt>
                        <span class="sect3">
                          <a href="#id2804092">10.2.1.4. <em class="firstterm"></em>Floating Point</a>
                        </span>
                      </dt>
                    </dl>
                  </dd>
                  <dt>
                    <span class="sect2">
                      <a href="#id2804356">10.2.2. Tag Resolution</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2804923">10.3. Core Schema</a>
                </span>
              </dt>
              <dd>
                <dl>
                  <dt>
                    <span class="sect2">
                      <a href="#id2805019">10.3.1. Tags</a>
                    </span>
                  </dt>
                  <dt>
                    <span class="sect2">
                      <a href="#id2805071">10.3.2. Tag Resolution</a>
                    </span>
                  </dt>
                </dl>
              </dd>
              <dt>
                <span class="sect1">
                  <a href="#id2805770">10.4. Other Schemas</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="appendix">
              <a href="#id2806177">Index</a>
            </span>
          </dt>
        </dl>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Introduction"></a>Chapter&nbsp;1.&nbsp;Introduction</h2>
            </div>
          </div>
        </div>
        <p>
      “<span class="quote">YAML Ain’t Markup Language</span>” (abbreviated YAML) is a data
      serialization language designed to be human-friendly and work well with
      modern programming languages for common everyday tasks. This
      specification is both an introduction to the YAML language and the
      concepts supporting it, and also a complete specification of the
      information needed to develop <a id="id2709598" class="indexterm"></a><a class="link" href="#application//">applications</a> for processing YAML.
    </p>
        <p>
      Open, interoperable and readily understandable tools have advanced
      computing immensely. YAML was designed from the start to be useful and
      friendly to people working with data. It uses Unicode <a id="id2709720" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a> characters, <a id="id2709733" class="indexterm"></a><a class="link" href="#indicator//">some</a> of which provide structural
      information and the rest containing the data itself. YAML achieves a
      unique cleanness by minimizing the amount of structural characters and
      allowing the data to show itself in a natural and meaningful way. For
      example, <a id="id2709751" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> may be used for structure,
      <a id="id2709767" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">colons</a> separate <a id="id2709781" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pairs</a>, and <a id="id2709796" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">dashes</a> are used to create
      “<span class="quote">bullet</span>” <a id="id2709811" class="indexterm"></a><a class="link" href="#sequence//">lists</a>.
    </p>
        <p>
      There are myriad flavors of <a id="id2709828" class="indexterm"></a><a class="link" href="#native%20data%20structure//">data
      structures</a>, but they can all be adequately <a id="id2709840" class="indexterm"></a><a class="link" href="#represent//">represented</a> with three basic primitives:
      <a id="id2709854" class="indexterm"></a><a class="link" href="#mapping//">mappings</a> (hashes/dictionaries),
      <a id="id2708564" class="indexterm"></a><a class="link" href="#sequence//">sequences</a> (arrays/lists) and
      <a id="id2708576" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> (strings/numbers). YAML
      leverages these primitives, and adds a simple typing system and <a id="id2708591" class="indexterm"></a><a class="link" href="#alias//">aliasing</a> mechanism to form a complete language
      for <a id="id2708606" class="indexterm"></a><a class="link" href="#serialize//">serializing</a> any <a id="id2708619" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structure</a>. While
      most programming languages can use YAML for data serialization, YAML
      excels in working with those languages that are fundamentally built
      around the three basic primitives. These include the new wave of agile
      languages such as Perl, Python, PHP, Ruby, and Javascript.
    </p>
        <p>
      There are hundreds of different languages for programming, but only a
      handful of languages for storing and transferring data. Even though its
      potential is virtually boundless, YAML was specifically created to work
      well for common use cases such as: configuration files, log files,
      interprocess messaging, cross-language data sharing, object persistence,
      and debugging of complex data structures. When data is easy to view and
      understand, programming becomes a simpler task.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2708649"></a>1.1.&nbsp;Goals</h2>
              </div>
            </div>
          </div>
          <p>
        The design goals for YAML are, in decreasing priority:
      </p>
          <div class="orderedlist">
            <ol type="1">
              <li>
          YAML is easily readable by humans.
        </li>
              <li>
          YAML data is portable between programming languages.
        </li>
              <li>
          YAML matches the <a id="id2708677" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
          structures</a> of agile languages.
        </li>
              <li>
          YAML has a consistent model to support generic tools.
        </li>
              <li>
          YAML supports one-pass processing.
        </li>
              <li>
          YAML is expressive and extensible.
        </li>
              <li>
          YAML is easy to implement and use.
        </li>
            </ol>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2708710"></a>1.2.&nbsp;Prior Art</h2>
              </div>
            </div>
          </div>
          <p>
        YAML’s initial direction was set by the data serialization and
        markup language discussions among <a class="ulink" href="http://www.docuverse.com/smldev/" target="_top">SML-DEV members</a>. Later
        on, it directly incorporated experience from Ingy döt Net’s
        Perl module <a class="ulink" href="http://search.cpan.org/dist/Data-Denter/" target="_top">Data::Denter</a>. Since then, YAML has matured through ideas and
        support from its user community.
      </p>
          <p>
        YAML integrates and builds upon concepts described by <a class="ulink" href="http://cm.bell-labs.com/cm/cs/cbook/index.html" target="_top">C</a>, <a class="ulink" href="http://java.sun.com/" target="_top">Java</a>, <a class="ulink" href="http://www.perl.org/" target="_top">Perl</a>, <a class="ulink" href="http://www.python.org/" target="_top">Python</a>, <a class="ulink" href="http://www.ruby-lang.org/" target="_top">Ruby</a>, <a class="ulink" href="http://www.ietf.org/rfc/rfc0822.txt" target="_top">RFC0822</a> (MAIL),
        <a class="ulink" href="http://www.ics.uci.edu/pub/ietf/html/rfc1866.txt" target="_top">RFC1866</a>
        (HTML), <a class="ulink" href="http://www.ietf.org/rfc/rfc2045.txt" target="_top">RFC2045</a> (MIME),
        <a class="ulink" href="http://www.ietf.org/rfc/rfc2396.txt" target="_top">RFC2396</a> (URI),
        <a class="ulink" href="http://www.w3.org/TR/REC-xml.html" target="_top">XML</a>, <a class="ulink" href="http://www.saxproject.org/" target="_top">SAX</a>, <a class="ulink" href="http://www.w3.org/TR/SOAP" target="_top">SOAP</a>, and <a class="ulink" href="http://www.json.org/" target="_top">JSON</a>.
      </p>
          <p>
        The syntax of YAML was motivated by Internet Mail (RFC0822) and remains
        partially compatible with that standard. Further, borrowing from MIME
        (RFC2045), YAML’s top-level production is a <a id="id2708832" class="indexterm"></a><a class="link" href="#stream//">stream</a> of independent <a id="id2708846" class="indexterm"></a><a class="link" href="#document//">documents</a>, ideal for message-based
        distributed processing systems.
      </p>
          <p>
        YAML’s <a id="id2708864" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a>-based scoping is similar
        to Python’s (without the ambiguities caused by <a id="id2708883" class="indexterm"></a><a class="link" href="#tab//">tabs</a>). <a id="id2708896" class="indexterm"></a><a class="link" href="#style/block/">Indented blocks</a> facilitate easy inspection
        of the data’s structure. YAML’s <a id="id2708915" class="indexterm"></a><a class="link" href="#style/block/literal">literal style</a> leverages
        this by enabling formatted text to be cleanly mixed within an <a id="id2708935" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> structure
        without troublesome <a id="id2708951" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escaping</a>. YAML also allows the use of
        traditional <a id="id2708969" class="indexterm"></a><a class="link" href="#indicator//">indicator</a>-based
        scoping similar to JSON’s and Perl’s. Such <a id="id2708984" class="indexterm"></a><a class="link" href="#style/flow/">flow content</a> can be freely
        nested inside <a id="id2759133" class="indexterm"></a><a class="link" href="#style/block/">indented
        blocks</a>.
      </p>
          <p>
        YAML’s <a id="id2759149" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted style</a> uses familiar
        C-style <a id="id2759164" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape sequences</a>. This enables ASCII encoding of
        non-<a id="id2759181" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a> or 8-bit
        (ISO 8859-1) characters such as <a class="link" href="#ns-esc-8-bit">“<span class="quote"><strong class="userinput"><code>\x3B</code></strong></span>”</a>. Non-<a id="id2759201" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a> 16-bit Unicode and
        32-bit (ISO/IEC 10646) characters are supported with <a id="id2759213" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape
        sequences</a> such as <a class="link" href="#ns-esc-16-bit">“<span class="quote"><strong class="userinput"><code>\u003B</code></strong></span>”</a> and <a class="link" href="#ns-esc-32-bit">“<span class="quote"><strong class="userinput"><code>\U0000003B</code></strong></span>”</a>.
      </p>
          <p>
        Motivated by HTML’s end-of-line normalization, YAML’s <a id="id2759251" class="indexterm"></a><a class="link" href="#line%20folding//">line folding</a> employs an intuitive
        method of handling <a id="id2759262" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a>.
        A single <a id="id2759272" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> is <a id="id2759283" class="indexterm"></a><a class="link" href="#line%20folding//">folded</a> into a single <a id="id2759293" class="indexterm"></a><a class="link" href="#space//">space</a>, while <a id="id2759304" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are interpreted as <a id="id2759315" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> characters. This technique allows for
        paragraphs to be word-wrapped without affecting the <a id="id2759327" class="indexterm"></a><a class="link" href="#scalar/canonical%20form/">canonical form</a> of
        the <a id="id2759340" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>.
      </p>
          <p>
        YAML’s core type system is based on the requirements of agile
        languages such as Perl, Python, and Ruby. YAML directly supports both
        <a id="id2759359" class="indexterm"></a><a class="link" href="#collection//">collections</a> (<a id="id2759369" class="indexterm"></a><a class="link" href="#mapping//">mappings</a>, <a id="id2759380" class="indexterm"></a><a class="link" href="#sequence//">sequences</a>) and <a id="id2759390" class="indexterm"></a><a class="link" href="#scalar//">scalars</a>. Support for these common types
        enables programmers to use their language’s <a id="id2759404" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a> for YAML manipulation,
        instead of requiring a special document object model (DOM).
      </p>
          <p>
        Like XML’s SOAP, YAML supports <a id="id2759421" class="indexterm"></a><a class="link" href="#serialize//">serializing</a> a graph of <a id="id2759432" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a>
        through an <a id="id2759442" class="indexterm"></a><a class="link" href="#alias//">aliasing</a> mechanism. Also
        like SOAP, YAML provides for <a id="id2759454" class="indexterm"></a><a class="link" href="#application//">application</a>-defined <a id="id2759464" class="indexterm"></a><a class="link" href="#tag//">types</a>. This allows YAML to <a id="id2759474" class="indexterm"></a><a class="link" href="#represent//">represent</a> rich data structures required
        for modern distributed computing. YAML provides globally unique
        <a id="id2759487" class="indexterm"></a><a class="link" href="#tag/global/">type names</a> using a
        namespace mechanism inspired by Java’s DNS-based package naming
        convention and XML’s URI-based namespaces. In addition, YAML allows
        for private <a id="id2759505" class="indexterm"></a><a class="link" href="#tag/local/">types</a>
        specific to a single <a id="id2759518" class="indexterm"></a><a class="link" href="#application//">application</a>.
      </p>
          <p>
        YAML was designed to support incremental interfaces that include both
        input (“<span class="quote"><strong class="userinput"><code>getNextEvent()</code></strong></span>”) and output
        (“<span class="quote"><strong class="userinput"><code>sendNextEvent()</code></strong></span>”) one-pass interfaces. Together, these
        enable YAML to support the processing of large <a id="id2759548" class="indexterm"></a><a class="link" href="#document//">documents</a> (e.g. transaction logs) or
        continuous <a id="id2759559" class="indexterm"></a><a class="link" href="#stream//">streams</a> (e.g. feeds from
        a production machine).
      </p>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2759572"></a>1.3.&nbsp;Relation to JSON</h2>
              </div>
            </div>
          </div>
          <p>
        Both JSON and YAML aim to be human readable data interchange formats.
        However, JSON and YAML have different priorities. JSON’s foremost
        design goal is simplicity and universality. Thus, JSON is trivial to
        generate and parse, at the cost of reduced human readability. It also
        uses a lowest common denominator information model, ensuring any JSON
        data can be easily processed by every modern programming environment.
      </p>
          <p>
        In contrast, YAML’s foremost design goals are human readability and
        support for <a id="id2759601" class="indexterm"></a><a class="link" href="#serialize//">serializing</a>
        arbitrary <a id="id2759612" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
        structures</a>. Thus, YAML allows for extremely readable files,
        but is more complex to generate and parse. In addition, YAML ventures
        beyond the lowest common denominator data types, requiring more complex
        processing when crossing between different programming environments.
      </p>
          <p>
        YAML can therefore be viewed as a natural superset of JSON, offering
        improved human readability and a more complete information model. This
        is also the case in practice; every JSON file is also a valid YAML
        file. This makes it easy to migrate from JSON to YAML if/when the
        additional features are required.
      </p>
          <p>
        JSON's <a class="ulink" href="http://www.ietf.org/rfc/rfc4627.txt" target="_top">RFC4627</a>
        requires that <a id="id2759645" class="indexterm"></a><a class="link" href="#mapping//">mappings</a> <a id="id2759656" class="indexterm"></a><a class="link" href="#key//">keys</a> merely “<span class="quote">SHOULD</span>” be <a id="id2759669" class="indexterm"></a><a class="link" href="#equality//">unique</a>, while YAML insists they
        “<span class="quote">MUST</span>” be. Technically, YAML therefore complies with the
        JSON spec, choosing to treat duplicates as an error. In practice, since
        JSON is silent on the semantics of such duplicates, the only portable
        JSON files are those with unique keys, which are therefore valid YAML
        files.
      </p>
          <p>
        It may be useful to define a intermediate format between YAML and JSON.
        Such a format would be trivial to parse (but not very human readable),
        like JSON. At the same time, it would allow for <a id="id2759696" class="indexterm"></a><a class="link" href="#serialize//">serializing</a> arbitrary <a id="id2759706" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a>, like
        YAML. Such a format might also serve as YAML’s "canonical format".
        Defining such a “<span class="quote">YSON</span>” format (YSON is a Serialized Object
        Notation) can be done either by enhancing the JSON specification or by
        restricting the YAML specification. Such a definition is beyond the
        scope of this specification.
      </p>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2759732"></a>1.4.&nbsp;Relation to XML</h2>
              </div>
            </div>
          </div>
          <p>
        Newcomers to YAML often search for its correlation to the eXtensible
        Markup Language (XML). Although the two languages may actually compete
        in several application domains, there is no direct correlation between
        them.
      </p>
          <p>
        YAML is primarily a data serialization language. XML was designed to be
        backwards compatible with the Standard Generalized Markup Language
        (SGML), which was designed to support structured documentation. XML
        therefore had many design constraints placed on it that YAML does not
        share. XML is a pioneer in many domains, YAML is the result of lessons
        learned from XML and other technologies.
      </p>
          <p>
        It should be mentioned that there are ongoing efforts to define
        standard XML/YAML mappings. This generally requires that a subset of
        each language be used. For more information on using both XML and YAML,
        please visit <a class="ulink" href="http://yaml.org/xml" target="_top">http://yaml.org/xml</a>.
      </p>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2759768"></a>1.5.&nbsp;Terminology</h2>
              </div>
            </div>
          </div>
          <p>
        This specification uses key words based on <a class="ulink" href="http://www.ietf.org/rfc/rfc2119.txt" target="_top">RFC2119</a> to indicate
        requirement level. In particular, the following words are used to
        describe the actions of a YAML <a id="id2759785" class="indexterm"></a><a class="link" href="#processor//">processor</a>:
      </p>
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">May</span>
              </dt>
              <dd>
            The word <span class="emphasis"><em>may</em></span>, or the adjective
            <span class="emphasis"><em>optional</em></span>, mean that conforming YAML <a id="id2759814" class="indexterm"></a><a class="link" href="#processor//">processors</a> are permitted to, but
            <a id="id2759825" class="indexterm"></a><a id="need not//"></a><em class="firstterm">need not</em> behave as described.
          </dd>
              <dt>
                <span class="term">Should</span>
              </dt>
              <dd>
            The word <span class="emphasis"><em>should</em></span>, or the adjective
            <span class="emphasis"><em>recommended</em></span>, mean that there could be reasons
            for a YAML <a id="id2759855" class="indexterm"></a><a class="link" href="#processor//">processor</a> to
            deviate from the behavior described, but that such deviation could
            hurt interoperability and should therefore be advertised with
            appropriate notice.
          </dd>
              <dt>
                <span class="term">Must</span>
              </dt>
              <dd>
            The word <span class="emphasis"><em>must</em></span>, or the term <a id="id2759881" class="indexterm"></a><a id="required//"></a><em class="firstterm">required</em> or <a id="id2759893" class="indexterm"></a><a id="shall//"></a><em class="firstterm">shall</em>, mean that the behavior described
            is an absolute requirement of the specification.
          </dd>
            </dl>
          </div>
        </div>
        <p>
      The rest of this document is arranged as follows. Chapter <a class="link" href="#Preview" title="Chapter&nbsp;2.&nbsp;Preview">2</a> provides a short preview of the main YAML
      features. Chapter <a class="link" href="#Processing" title="Chapter&nbsp;3.&nbsp;Processing YAML Information">3</a> describes the YAML
      information model, and the processes for converting from and to this
      model and the YAML text format. The bulk of the document, chapters <a class="link" href="#Syntax" title="Chapter&nbsp;4.&nbsp;Syntax Conventions">4</a> through <a class="link" href="#YAML" title="Chapter&nbsp;9.&nbsp;YAML Character Stream">9</a>, formally
      define this text format. Finally, chapter <a class="link" href="#Syntax" title="Chapter&nbsp;4.&nbsp;Syntax Conventions">10</a> recommends basic YAML schemas.
    </p>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Preview"></a>Chapter&nbsp;2.&nbsp;Preview</h2>
            </div>
          </div>
        </div>
        <p>
      This section provides a quick glimpse into the expressive power of YAML.
      It is not expected that the first-time reader grok all of the examples.
      Rather, these selections are used as motivation for the remainder of the
      specification.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2759963"></a>2.1.&nbsp;Collections</h2>
              </div>
            </div>
          </div>
          <p>
        YAML’s <a id="id2759971" class="indexterm"></a><a class="link" href="#style/block/collection">block collections</a> use <a id="id2759986" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> for scope
        and begin each entry on its own line. <a id="id2760000" class="indexterm"></a><a class="link" href="#style/block/sequence">Block sequences</a>
        indicate each entry with a dash and space&nbsp;( <a id="id2760016" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">“<span class="quote"><strong class="userinput"><code>-&nbsp;</code></strong></span>”</a>). <a id="id2760032" class="indexterm"></a><a class="link" href="#mapping//">Mappings</a> use a colon and
        space&nbsp;(<a id="id2760044" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:&nbsp;</code></strong></span>”</a>) to mark each <a id="id2760059" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pair</a>. <a id="id2760069" class="indexterm"></a><a class="link" href="#comment//">Comments</a> begin with an octothorpe (also
        called a “<span class="quote">hash</span>”, “<span class="quote">sharp</span>”,
        “<span class="quote">pound</span>”, or “<span class="quote">number sign</span>” - <a id="id2760093" class="indexterm"></a><a class="link" href="##%20comment//"> “<span class="quote"><strong class="userinput"><code>#</code></strong></span>”</a>).
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2760118"></a><p class="title"><b>Example&nbsp;2.1.&nbsp;
              Sequence of Scalars<br>
              (ball players)
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">- Mark McGwire<br>- Sammy Sosa
- Ken Griffey
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2760142"></a><p class="title"><b>Example&nbsp;2.2.&nbsp;
              Mapping Scalars to Scalars<br>
              (player statistics)
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">hr:  65    # Home runs<br>avg: 0.278 # Batting average
rbi: 147   # Runs Batted In
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
            <tr>
              <td width="50%">
          <div class="example"><a id="id2760167"></a><p class="title"><b>Example&nbsp;2.3.&nbsp;
              Mapping Scalars to Sequences<br>
              (ball clubs in each league)
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">american:<br>  - Boston Red Sox
  - Detroit Tigers
  - New York Yankees
national:
  - New York Mets
  - Chicago Cubs
  - Atlanta Braves
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2760193"></a><p class="title"><b>Example&nbsp;2.4.&nbsp;
              Sequence of Mappings<br>
              (players’ statistics)
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">-<br>  name: Mark McGwire
  hr:   65
  avg:  0.278
-
  name: Sammy Sosa
  hr:   63
  avg:  0.288
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
          <p>
        YAML also has <a id="id2760221" class="indexterm"></a><a class="link" href="#style/flow/">flow
        styles</a>, using explicit <a id="id2760233" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> rather than <a id="id2760244" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> to denote
        scope. The <a id="id2760257" class="indexterm"></a><a class="link" href="#style/flow/sequence">flow sequence</a> is written as a <a id="id2760271" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">comma</a> separated list within
        <a id="id2760282" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">square</a> <a id="id2760293" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">brackets</a>. In a similar manner,
        the <a id="id2760304" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow
        mapping</a> uses <a id="id2760319" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">curly</a> <a id="id2760330" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">braces</a>.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2760351"></a><p class="title"><b>Example&nbsp;2.5.&nbsp;Sequence of Sequences</b></p><div class="example-contents"><pre class="programlisting"><span class="database">- [name        , hr, avg  ]<br>- [Mark McGwire, 65, 0.278]
- [Sammy Sosa  , 63, 0.288]


</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2760372"></a><p class="title"><b>Example&nbsp;2.6.&nbsp;Mapping of Mappings</b></p><div class="example-contents"><pre class="programlisting"><span class="database">Mark McGwire: {hr: 65, avg: 0.278}<br>Sammy Sosa: {
    hr: 63,
    avg: 0.288
  }
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2760395"></a>2.2.&nbsp;Structures</h2>
              </div>
            </div>
          </div>
          <p>
        YAML uses three dashes&nbsp;(<a id="id2760404" class="indexterm"></a><a class="link" href="#marker/directives%20end/">“<span class="quote"><strong class="userinput"><code>---</code></strong></span>”</a>) to separate
        <a id="id2760420" class="indexterm"></a><a class="link" href="#directive//">directives</a> from <a id="id2760431" class="indexterm"></a><a class="link" href="#document//">document</a> <a id="id2760441" class="indexterm"></a><a class="link" href="#content//">content</a>. This also serves to signal the
        start of a document if no <a id="id2760453" class="indexterm"></a><a class="link" href="#directive//">directives</a> are present. Three dots&nbsp;(
        <a id="id2760464" class="indexterm"></a><a class="link" href="#marker/document%20end/">“<span class="quote"><strong class="userinput"><code>...</code></strong></span>”</a>) indicate the end of a document
        without starting a new one, for use in communication channels.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2760493"></a><p class="title"><b>Example&nbsp;2.7.&nbsp;
              Two Documents in a Stream<br>
              (each with a leading comment)
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database"># Ranking of 1998 home runs<br>---
- Mark McGwire
- Sammy Sosa
- Ken Griffey

# Team ranking
---
- Chicago Cubs
- St Louis Cardinals
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2760519"></a><p class="title"><b>Example&nbsp;2.8.&nbsp;
              Play by Play Feed<br>
              from a Game
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">---<br>time: 20:03:20
player: Sammy Sosa
action: strike (miss)
...
---
time: 20:03:47
player: Sammy Sosa
action: grand slam
...
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
          <p>
        Repeated <a id="id2760545" class="indexterm"></a><a class="link" href="#node//">nodes</a> (objects) are first
        <a id="id2760556" class="indexterm"></a><a class="link" href="#alias/identified/">identified</a>
        by an <a id="id2760569" class="indexterm"></a><a class="link" href="#anchor//">anchor</a> (marked with the
        ampersand&nbsp;-&nbsp;<a id="id2760581" class="indexterm"></a><a class="link" href="#&amp;%20anchor//">“<span class="quote"><strong class="userinput"><code>&amp;</code></strong></span>”</a>), and are then <a id="id2760596" class="indexterm"></a><a class="link" href="#alias//">aliased</a> (referenced with an
        asterisk&nbsp;-&nbsp;<a id="id2760608" class="indexterm"></a><a class="link" href="#*%20alias//">“<span class="quote"><strong class="userinput"><code>*</code></strong></span>”</a>) thereafter.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2760633"></a><p class="title"><b>Example&nbsp;2.9.&nbsp;
              Single Document with<br>
              Two Comments
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">---<br>hr: # 1998 hr ranking
  - Mark McGwire
  - Sammy Sosa
rbi:
  # 1998 rbi ranking
  - Sammy Sosa
  - Ken Griffey
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2760658"></a><p class="title"><b>Example&nbsp;2.10.&nbsp;
              Node for “<span class="quote"><strong class="userinput"><code>Sammy Sosa</code></strong></span>”<br>
              appears twice in this document
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">---<br>hr:
  - Mark McGwire
  # Following node labeled SS
  - &amp;SS Sammy Sosa
rbi:
  - *SS # Subsequent occurrence
  - Ken Griffey
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
          <p>
        A question mark and space&nbsp;(<a id="id2760695" class="indexterm"></a><a class="link" href="#?%20mapping%20key//">“<span class="quote"><strong class="userinput"><code>?&nbsp;</code></strong></span>”</a>) indicate a complex <a id="id2760710" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> <a id="id2760721" class="indexterm"></a><a class="link" href="#key//">key</a>. Within a <a id="id2760731" class="indexterm"></a><a class="link" href="#style/block/collection">block collection</a>,
        <a id="id2760746" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pairs</a> can
        start immediately following the <a id="id2760757" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">dash</a>, <a id="id2760768" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">colon</a>, or <a id="id2760779" class="indexterm"></a><a class="link" href="#?%20mapping%20key//">question
        mark</a>.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2760799"></a><p class="title"><b>Example&nbsp;2.11.&nbsp;Mapping between Sequences</b></p><div class="example-contents"><pre class="programlisting"><span class="database">? - Detroit Tigers<br>  - Chicago cubs
:
  - 2001-07-23

? [ New York Yankees,
    Atlanta Braves ]
: [ 2001-07-02, 2001-08-12,
    2001-08-14 ]
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2760821"></a><p class="title"><b>Example&nbsp;2.12.&nbsp;Compact Nested Mapping</b></p><div class="example-contents"><pre class="programlisting"><span class="database">---<br># Products purchased
- item    : Super Hoop
  quantity: 1
- item    : Basketball
  quantity: 4
- item    : Big Shoes
  quantity: 1

</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2760844"></a>2.3.&nbsp;Scalars</h2>
              </div>
            </div>
          </div>
          <p>
        <a id="id2760851" class="indexterm"></a><a class="link" href="#scalar//">Scalar content</a> can be written in
        <a id="id2760861" class="indexterm"></a><a class="link" href="#style/block/">block</a> notation,
        using a <a id="id2760874" class="indexterm"></a><a class="link" href="#style/block/literal">literal style</a>&nbsp;(indicated by <a id="id2760889" class="indexterm"></a><a class="link" href="#%7C%20literal%20style//">“<span class="quote"><strong class="userinput"><code>|</code></strong></span>”</a>) where all
        <a id="id2760903" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> are significant.
        Alternatively, they can be written with the <a id="id2760915" class="indexterm"></a><a class="link" href="#style/block/folded">folded
        style</a>&nbsp;<a id="id2760930" class="indexterm"></a><a class="link" href="#%3E%20folded%20style//">(denoted by
        “<span class="quote"><strong class="userinput"><code>&gt;</code></strong></span>”</a>) where each <a id="id2760946" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> is <a id="id2760957" class="indexterm"></a><a class="link" href="#line%20folding//">folded</a> to a <a id="id2760968" class="indexterm"></a><a class="link" href="#space//">space</a>
        unless it ends an <a id="id2760978" class="indexterm"></a><a class="link" href="#empty%20line//">empty</a> or a
        <a id="id2760989" class="indexterm"></a><a class="link" href="#more-indented//">more-indented</a> line.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2761008"></a><p class="title"><b>Example&nbsp;2.13.&nbsp;
              In literals,<br>
              newlines are preserved
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database"># ASCII Art<br>--- |
  \//||\/||
  // ||  ||__
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761032"></a><p class="title"><b>Example&nbsp;2.14.&nbsp;
              In the folded scalars,<br>
              newlines become spaces
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">--- &gt;<br>  Mark McGwire's
  year was crippled
  by a knee injury.
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
            <tr>
              <td width="50%">
          <div class="example"><a id="id2761056"></a><p class="title"><b>Example&nbsp;2.15.&nbsp;
              Folded newlines are preserved<br>
              for "more indented" and blank lines
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">&gt;<br> Sammy Sosa completed another
 fine season with great stats.

   63 Home Runs
   0.288 Batting Average

 What a year!
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761083"></a><p class="title"><b>Example&nbsp;2.16.&nbsp;
              Indentation determines scope<br>
              &nbsp;
            </b></p><div class="example-contents"><pre class="programlisting"><span class="database">name: Mark McGwire<br>accomplishment: &gt;
  Mark set a major league
  home run record in 1998.
stats: |
  65 Home Runs
  0.278 Batting Average

</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
          <p>
        YAML’s <a id="id2761114" class="indexterm"></a><a class="link" href="#style/flow/scalar">flow scalars</a> include the <a id="id2761128" class="indexterm"></a><a class="link" href="#style/flow/plain">plain style</a>
        (most examples thus far) and two quoted styles. The <a id="id2761144" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted
        style</a> provides <a id="id2761159" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape sequences</a>. The <a id="id2761173" class="indexterm"></a><a class="link" href="#style/flow/">single-quoted
        style</a> is useful when <a id="id2761186" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escaping</a> is not needed.
        All <a id="id2761199" class="indexterm"></a><a class="link" href="#style/flow/scalar">flow
        scalars</a> can span multiple lines; <a id="id2761214" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> are always <a id="id2761225" class="indexterm"></a><a class="link" href="#line%20folding//">folded</a>.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2761245"></a><p class="title"><b>Example&nbsp;2.17.&nbsp;Quoted Scalars</b></p><div class="example-contents"><pre class="programlisting"><span class="database">unicode: "Sosa did fine.\u263A"<br>control: "\b1998\t1999\t2000\n"
hex esc: "\x0d\x0a is \r\n"

single: '"Howdy!" he cried.'
quoted: ' # Not a ''comment''.'
tie-fighter: '|\-*-/|'
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761268"></a><p class="title"><b>Example&nbsp;2.18.&nbsp;Multi-line Flow Scalars</b></p><div class="example-contents"><pre class="programlisting"><span class="database">plain:<br>  This unquoted scalar
  spans many lines.

quoted: "So does this
  quoted scalar.\n"

</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2761292"></a>2.4.&nbsp;Tags</h2>
              </div>
            </div>
          </div>
          <p>
        In YAML, <a id="id2761300" class="indexterm"></a><a class="link" href="#tag/non-specific/">untagged
        nodes</a> are given a type depending on the <a id="id2761313" class="indexterm"></a><a class="link" href="#application//">application</a>. The examples in this
        specification generally use the <a id="id2761324" class="indexterm"></a><a class="link" href="#tag/repository/seq">
        <strong class="userinput"><code>seq</code></strong></a>, <a id="id2761343" class="indexterm"></a><a class="link" href="#tag/repository/map">
        <strong class="userinput"><code>map</code></strong></a> and <a id="id2761362" class="indexterm"></a><a class="link" href="#tag/repository/str">
        <strong class="userinput"><code>str</code></strong></a> types from the <a id="id2761381" class="indexterm"></a><a class="link" href="#schema/failsafe/">fail safe schema</a>. A few
        examples also use the <a id="id2761394" class="indexterm"></a><a class="link" href="#tag/repository/int"><strong class="userinput"><code>int</code></strong></a>, <a id="id2761412" class="indexterm"></a><a class="link" href="#tag/repository/float"><strong class="userinput"><code>float</code></strong></a>, and <a id="id2761430" class="indexterm"></a><a class="link" href="#tag/repository/null"><strong class="userinput"><code>null</code></strong></a> types from the
        <a id="id2761447" class="indexterm"></a><a class="link" href="#schema/JSON/">JSON schema</a>. The
        <a id="id2761460" class="indexterm"></a><a class="link" href="#tag/repository/">repository</a>
        includes additional types such as <a class="ulink" href="http://yaml.org/type/binary.html" target="_top"><strong class="userinput"><code>binary</code></strong></a>, <a class="ulink" href="http://yaml.org/type/omap.html" target="_top"><strong class="userinput"><code>omap</code></strong></a>,
        <a class="ulink" href="http://yaml.org/type/set.html" target="_top"><strong class="userinput"><code>set</code></strong></a>
        and others.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2761509"></a><p class="title"><b>Example&nbsp;2.19.&nbsp;Integers</b></p><div class="example-contents"><pre class="programlisting"><span class="database">canonical: 12345<br>decimal: +12345
octal: 0o14
hexadecimal: 0xC

</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761530"></a><p class="title"><b>Example&nbsp;2.20.&nbsp;Floating Point</b></p><div class="example-contents"><pre class="programlisting"><span class="database">canonical: 1.23015e+3<br>exponential: 12.3015e+02
fixed: 1230.15
negative infinity: -.inf
not a number: .NaN
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
            <tr>
              <td width="50%">
          <div class="example"><a id="id2761552"></a><p class="title"><b>Example&nbsp;2.21.&nbsp;Miscellaneous</b></p><div class="example-contents"><pre class="programlisting"><span class="database">null:<br>booleans: [ true, false ]
string: '012345'
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761573"></a><p class="title"><b>Example&nbsp;2.22.&nbsp;Timestamps</b></p><div class="example-contents"><pre class="programlisting"><span class="database">canonical: 2001-12-15T02:59:43.1Z<br>iso8601: 2001-12-14t21:59:43.10-05:00
spaced: 2001-12-14 21:59:43.10 -5
date: 2002-12-14
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
          <p>
        Explicit typing is denoted with a <a id="id2761597" class="indexterm"></a><a class="link" href="#tag//">tag</a>
        using the exclamation point (<a id="id2761608" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator//">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a>) symbol. <a id="id2761623" class="indexterm"></a><a class="link" href="#tag/global/">Global tags</a> are URIs and may be specified
        in a <a id="id2761637" class="indexterm"></a><a class="link" href="#tag/shorthand/">tag
        shorthand</a> notation using a <a id="id2761649" class="indexterm"></a><a class="link" href="#tag/handle/">handle</a>. <a id="id2761662" class="indexterm"></a><a class="link" href="#application//">Application</a>-specific <a id="id2761672" class="indexterm"></a><a class="link" href="#tag/local/">local tags</a> may also be used.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2761694"></a><p class="title"><b>Example&nbsp;2.23.&nbsp;Various Explicit Tags</b></p><div class="example-contents"><pre class="programlisting"><span class="database">---<br>not-date: !!str 2002-04-28

picture: !!binary |
 R0lGODlhDAAMAIQAAP//9/X
 17unp5WZmZgAAAOfn515eXv
 Pz7Y6OjuDg4J+fn5OTk6enp
 56enmleECcgggoBADs=

application specific tag: !something |
 The semantics of the tag
 above may be different for
 different documents.

</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761719"></a><p class="title"><b>Example&nbsp;2.24.&nbsp;Global Tags</b></p><div class="example-contents"><pre class="programlisting"><span class="database">%TAG ! tag:clarkevans.com,2002:<br>--- !shape
  # Use the ! handle for presenting
  # tag:clarkevans.com,2002:circle
- !circle
  center: &amp;ORIGIN {x: 73, y: 129}
  radius: 7
- !line
  start: *ORIGIN
  finish: { x: 89, y: 102 }
- !label
  start: *ORIGIN
  color: 0xFFEEBB
  text: Pretty vector drawing.
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2761758"></a><p class="title"><b>Example&nbsp;2.25.&nbsp;Unordered Sets</b></p><div class="example-contents"><pre class="programlisting"><span class="database"># Sets are represented as a<br># Mapping where each key is
# associated with a null value
--- !!set
? Mark McGwire
? Sammy Sosa
? Ken Griff
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761780"></a><p class="title"><b>Example&nbsp;2.26.&nbsp;Ordered Mappings</b></p><div class="example-contents"><pre class="programlisting"><span class="database"># Ordered maps are represented as<br># A sequence of mappings, with
# each mapping having one key
--- !!omap
- Mark McGwire: 65
- Sammy Sosa: 63
- Ken Griffy: 58
</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2761803"></a>2.5.&nbsp;Full Length Example</h2>
              </div>
            </div>
          </div>
          <p>
        Below are two full-length examples of YAML. On the left is a sample
        invoice; on the right is a sample log file.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <div class="example"><a id="id2761823"></a><p class="title"><b>Example&nbsp;2.27.&nbsp;Invoice</b></p><div class="example-contents"><pre class="programlisting"><span class="database">--- !&lt;tag:clarkevans.com,2002:invoice&gt;<br>invoice: 34843
date   : 2001-01-23
bill-to: &amp;id001
    given  : Chris
    family : Dumars
    address:
        lines: |
            458 Walkman Dr.
            Suite #292
        city    : Royal Oak
        state   : MI
        postal  : 48046
ship-to: *id001
product:
    - sku         : BL394D
      quantity    : 4
      description : Basketball
      price       : 450.00
    - sku         : BL4438H
      quantity    : 1
      description : Super Hoop
      price       : 2392.00
tax  : 251.42
total: 4443.52
comments:
    Late afternoon is best.
    Backup contact is Nancy
    Billsmer @ 338-4338.
</span></pre></div></div><br class="example-break">
        </td>
              <td width="50%">
          <div class="example"><a id="id2761866"></a><p class="title"><b>Example&nbsp;2.28.&nbsp;Log File</b></p><div class="example-contents"><pre class="programlisting"><span class="database">---<br>Time: 2001-11-23 15:01:42 -5
User: ed
Warning:
  This is an error message
  for the log file
---
Time: 2001-11-23 15:02:31 -5
User: ed
Warning:
  A slightly different error
  message.
---
Date: 2001-11-23 15:03:17 -5
User: ed
Fatal:
  Unknown variable "bar"
Stack:
  - file: TopClass.py
    line: 23
    code: |
      x = MoreObject("345\n")
  - file: MoreClass.py
    line: 58
    code: |-
      foo = bar



</span></pre></div></div><br class="example-break">
        </td>
            </tr>
          </tbody></table>
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Processing"></a>Chapter&nbsp;3.&nbsp;Processing YAML Information</h2>
            </div>
          </div>
        </div>
        <p>
      YAML is both a text format and a method for <a id="id2761904" class="indexterm"></a><a class="link" href="#present//">presenting</a> any <a id="id2761915" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structure</a> in this format. Therefore,
      this specification defines two concepts: a class of data objects called
      YAML <a id="id2761928" class="indexterm"></a><a class="link" href="#representation//">representations</a>, and a
      syntax for <a id="id2761938" class="indexterm"></a><a class="link" href="#present//">presenting</a> YAML <a id="id2761949" class="indexterm"></a><a class="link" href="#representation//">representations</a> as a series of
      characters, called a YAML <a id="id2761960" class="indexterm"></a><a class="link" href="#stream//">stream</a>. A
      YAML <a id="id2761971" class="indexterm"></a><a id="processor//"></a><em class="firstterm">processor</em> is a tool for
      converting information between these complementary views. It is assumed
      that a YAML processor does its work on behalf of another module, called
      an <a id="id2761985" class="indexterm"></a><a id="application//"></a><em class="firstterm">application</em>. This chapter
      describes the information structures a YAML processor must provide to or
      obtain from the application.
    </p>
        <p>
      YAML information is used in two ways: for machine processing, and for
      human consumption. The challenge of reconciling these two perspectives is
      best done in three distinct translation stages: <a id="id2762006" class="indexterm"></a><a class="link" href="#representation//">representation</a>, <a id="id2762016" class="indexterm"></a><a class="link" href="#serialization//">serialization</a>, and <a id="id2762027" class="indexterm"></a><a class="link" href="#presentation//">presentation</a>. <a id="id2762037" class="indexterm"></a><a class="link" href="#representation//">Representation</a> addresses how YAML
      views <a id="id2762048" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
      structures</a> to achieve portability between programming
      environments. <a id="id2762060" class="indexterm"></a><a class="link" href="#serialization//">Serialization</a>
      concerns itself with turning a YAML <a id="id2762071" class="indexterm"></a><a class="link" href="#representation//">representation</a> into a serial form,
      that is, a form with sequential access constraints. <a id="id2762083" class="indexterm"></a><a class="link" href="#presentation//">Presentation</a> deals with the formatting
      of a YAML <a id="id2762094" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> as a
      series of characters in a human-friendly manner.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2762107"></a>3.1.&nbsp;Processes</h2>
              </div>
            </div>
          </div>
          <p>
        Translating between <a id="id2762115" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native
        data structures</a> and a character <a id="id2762126" class="indexterm"></a><a class="link" href="#stream//">stream</a> is done in several logically distinct
        stages, each with a well defined input and output data model, as shown
        in the following diagram:
      </p>
          <div class="figure">
            <a id="id2762140"></a>
            <p class="title">
              <b>Figure&nbsp;3.1.&nbsp;Processing Overview</b>
            </p>
            <div class="figure-contents">
              <div class="mediaobject">
                <img src="overview2.png" alt="Processing Overview">
              </div>
            </div>
          </div>
          <br class="figure-break">
          <p>
        A YAML processor need not expose the <a id="id2762164" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> or <a id="id2762175" class="indexterm"></a><a class="link" href="#representation//">representation</a> stages. It may
        translate directly between <a id="id2762186" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a> and a character <a id="id2762198" class="indexterm"></a><a class="link" href="#stream//">stream</a> (<a id="id2762208" class="indexterm"></a><a class="link" href="#dump//">dump</a> and <a id="id2762218" class="indexterm"></a><a class="link" href="#load//">load</a> in the diagram above). However, such a
        direct translation should take place so that the <a id="id2762231" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a> are
        <a id="id2762241" class="indexterm"></a><a class="link" href="#construct//">constructed</a> only from
        information available in the <a id="id2762252" class="indexterm"></a><a class="link" href="#representation//">representation</a>. In particular,
        <a id="id2762263" class="indexterm"></a><a class="link" href="#key/order/">mapping key order</a>,
        <a id="id2762275" class="indexterm"></a><a class="link" href="#comment//">comments</a>, and <a id="id2762286" class="indexterm"></a><a class="link" href="#tag/handle/">tag handles</a> should not be
        referenced during <a id="id2762299" class="indexterm"></a><a class="link" href="#compose//">composition</a>.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2762313"></a>3.1.1.&nbsp;Dump</h3>
                </div>
              </div>
            </div>
            <p>
          <a id="id2762320" class="indexterm"></a><a id="dump//"></a><em class="firstterm">Dumping</em> native data structures to a
          character <a id="id2762332" class="indexterm"></a><a class="link" href="#stream//">stream</a> is done using
          the following three stages:
        </p>
            <div class="variablelist">
              <dl>
                <dt>
                  <span class="term">Representing Native Data Structures</span>
                </dt>
                <dd>
                  <p>
                YAML <a id="id2762357" class="indexterm"></a><a id="represent//"></a><em class="firstterm">represents</em> any
                <a id="id2762370" class="indexterm"></a><a id="native data structure//"></a><em class="firstterm">native data
                structure</em> using three <a id="id2762381" class="indexterm"></a><a class="link" href="#kind//">node
                kinds</a>: <a id="id2762392" class="indexterm"></a><a class="link" href="#sequence//">sequence</a>
                - an ordered series of entries; <a id="id2762403" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> - an unordered association
                of <a id="id2762414" class="indexterm"></a><a class="link" href="#equality//">unique</a> <a id="id2762425" class="indexterm"></a><a class="link" href="#key//">keys</a> to <a id="id2762435" class="indexterm"></a><a class="link" href="#value//">values</a>; and <a id="id2762446" class="indexterm"></a><a class="link" href="#scalar//">scalar</a> - any datum with opaque
                structure presentable as a series of Unicode characters.
                Combined, these primitives generate directed graph structures.
                These primitives were chosen because they are both powerful and
                familiar: the <a id="id2762461" class="indexterm"></a><a class="link" href="#sequence//">sequence</a>
                corresponds to a Perl array and a Python list, the <a id="id2762473" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> corresponds to a Perl hash
                table and a Python dictionary. The <a id="id2762484" class="indexterm"></a><a class="link" href="#scalar//">scalar</a> represents strings, integers,
                dates, and other atomic data types.
              </p>
                  <p>
                Each YAML <a id="id2762500" class="indexterm"></a><a class="link" href="#node//">node</a> requires, in
                addition to its <a id="id2762511" class="indexterm"></a><a class="link" href="#kind//">kind</a> and
                <a id="id2762522" class="indexterm"></a><a class="link" href="#content//">content</a>, a <a id="id2762532" class="indexterm"></a><a class="link" href="#tag//">tag</a> specifying its data type. Type
                specifiers are either <a id="id2762544" class="indexterm"></a><a class="link" href="#tag/global/">global</a> URIs, or are <a id="id2762556" class="indexterm"></a><a class="link" href="#tag/local/">local</a> in scope to a
                single <a id="id2762570" class="indexterm"></a><a class="link" href="#application//">application</a>.
                For example, an integer is represented in YAML with a <a id="id2762581" class="indexterm"></a><a class="link" href="#scalar//">scalar</a> plus the <a id="id2762592" class="indexterm"></a><a class="link" href="#tag/global/">global tag</a>
                “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:int</code></strong></span>”. Similarly, an invoice
                object, particular to a given organization, could be
                represented as a <a id="id2762613" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>
                together with the <a id="id2762624" class="indexterm"></a><a class="link" href="#tag/local/">local tag</a>
                “<span class="quote"><strong class="userinput"><code>!invoice</code></strong></span>”. This simple model can represent any
                data structure independent of programming language.
              </p>
                </dd>
                <dt>
                  <span class="term">Serializing the Representation Graph</span>
                </dt>
                <dd>
              For sequential access mediums, such as an event callback API, a
              YAML <a id="id2762658" class="indexterm"></a><a class="link" href="#representation//">representation</a>
              must be <a id="id2762668" class="indexterm"></a><a id="serialize//"></a><em class="firstterm">serialized</em> to an
              ordered tree. Since in a YAML <a id="id2762681" class="indexterm"></a><a class="link" href="#representation//">representation</a>, <a id="id2762691" class="indexterm"></a><a class="link" href="#key//">mapping keys</a> are unordered and <a id="id2762702" class="indexterm"></a><a class="link" href="#node//">nodes</a> may be referenced more than once
              (have more than one incoming “<span class="quote">arrow</span>”), the
              serialization process is required to impose an <a id="id2762718" class="indexterm"></a><a class="link" href="#key/order/">ordering</a> on the
              <a id="id2762730" class="indexterm"></a><a class="link" href="#key//">mapping keys</a> and to replace the
              second and subsequent references to a given <a id="id2762742" class="indexterm"></a><a class="link" href="#node//">node</a> with place holders called <a id="id2762753" class="indexterm"></a><a class="link" href="#alias//">aliases</a>. YAML does not specify how
              these <a id="id2762764" class="indexterm"></a><a id="serialization/detail/"></a><em class="firstterm">serialization details</em> are chosen. It
              is up to the YAML <a id="id2762779" class="indexterm"></a><a class="link" href="#processor//">processor</a> to come up with
              human-friendly <a id="id2762790" class="indexterm"></a><a class="link" href="#key/order/">key
              order</a> and <a id="id2762802" class="indexterm"></a><a class="link" href="#anchor//">anchor</a>
              names, possibly with the help of the <a id="id2762814" class="indexterm"></a><a class="link" href="#application//">application</a>. The result of this
              process, a YAML <a id="id2762825" class="indexterm"></a><a class="link" href="#serialization//">serialization
              tree</a>, can then be traversed to produce a series of
              event calls for one-pass processing of YAML data.
            </dd>
                <dt>
                  <span class="term">Presenting the Serialization Tree</span>
                </dt>
                <dd>
              The final output process is <a id="id2762850" class="indexterm"></a><a id="present//"></a><em class="firstterm">presenting</em> the YAML <a id="id2762861" class="indexterm"></a><a class="link" href="#serialization//">serializations</a> as a character
              <a id="id2762872" class="indexterm"></a><a class="link" href="#stream//">stream</a> in a human-friendly
              manner. To maximize human readability, YAML offers a rich set of
              stylistic options which go far beyond the minimal functional
              needs of simple data storage. Therefore the YAML <a id="id2762887" class="indexterm"></a><a class="link" href="#processor//">processor</a> is required to introduce
              various <a id="id2762898" class="indexterm"></a><a id="presentation/detail/"></a><em class="firstterm">presentation details</em> when creating
              the <a id="id2762912" class="indexterm"></a><a class="link" href="#stream//">stream</a>, such as the
              choice of <a id="id2762923" class="indexterm"></a><a class="link" href="#style//">node styles</a>, how to
              <a id="id2762934" class="indexterm"></a><a class="link" href="#scalar/content%20format/">format
              scalar content</a>, the amount of <a id="id2762947" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a>, which <a id="id2762960" class="indexterm"></a><a class="link" href="#tag/handle/">tag handles</a> to use,
              the <a id="id2762972" class="indexterm"></a><a class="link" href="#tag//">node tags</a> to leave <a id="id2762982" class="indexterm"></a><a class="link" href="#tag/non-specific/">unspecified</a>, the
              set of <a id="id2762995" class="indexterm"></a><a class="link" href="#directive//">directives</a> to
              provide and possibly even what <a id="id2763006" class="indexterm"></a><a class="link" href="#comment//">comments</a> to add. While some of this
              can be done with the help of the <a id="id2763018" class="indexterm"></a><a class="link" href="#application//">application</a>, in general this
              process should be guided by the preferences of the user.
            </dd>
              </dl>
            </div>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2763035"></a>3.1.2.&nbsp;Load</h3>
                </div>
              </div>
            </div>
            <p>
          <a id="id2763042" class="indexterm"></a><a id="load//"></a><em class="firstterm">Loading</em> <a id="id2763054" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a> from a character
          <a id="id2763065" class="indexterm"></a><a class="link" href="#stream//">stream</a> is done using the
          following three stages:
        </p>
            <div class="variablelist">
              <dl>
                <dt>
                  <span class="term">Parsing the Presentation Stream</span>
                </dt>
                <dd><a id="id2763088" class="indexterm"></a><a id="parse//"></a><em class="firstterm">Parsing</em> is the inverse process
              of <a id="id2763100" class="indexterm"></a><a class="link" href="#present//">presentation</a>, it takes a
              <a id="id2763111" class="indexterm"></a><a class="link" href="#stream//">stream</a> of characters and
              produces a series of events. Parsing discards all the <a id="id2763123" class="indexterm"></a><a class="link" href="#presentation/detail/">details</a>
              introduced in the <a id="id2763136" class="indexterm"></a><a class="link" href="#present//">presentation</a> process, reporting only
              the <a id="id2763147" class="indexterm"></a><a class="link" href="#serialization//">serialization</a>
              events. Parsing can fail due to <a id="id2763159" class="indexterm"></a><a class="link" href="#stream/ill-formed/">ill-formed</a> input.
            </dd>
                <dt>
                  <span class="term">Composing the Representation Graph</span>
                </dt>
                <dd><a id="id2763181" class="indexterm"></a><a id="compose//"></a><em class="firstterm">Composing</em> takes a series of
              <a id="id2763194" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> events
              and produces a <a id="id2763205" class="indexterm"></a><a class="link" href="#representation//">representation
              graph</a>. Composing discards all the <a id="id2763216" class="indexterm"></a><a class="link" href="#serialization/detail/">details</a>
              introduced in the <a id="id2763230" class="indexterm"></a><a class="link" href="#serialize//">serialization</a> process, producing
              only the <a id="id2763241" class="indexterm"></a><a class="link" href="#representation//">representation
              graph</a>. Composing can fail due to any of several
              reasons, detailed <a id="id2763253" class="indexterm"></a><a class="link" href="#load/failure%20point/">below</a>.
            </dd>
              </dl>
            </div>
            <div class="variablelist">
              <dl>
                <dt>
                  <span class="term">Constructing Native Data Structures</span>
                </dt>
                <dd>
              The final input process is <a id="id2763281" class="indexterm"></a><a id="construct//"></a><em class="firstterm">constructing</em>&nbsp;<a id="id2763292" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a>
              from the YAML <a id="id2763303" class="indexterm"></a><a class="link" href="#representation//">representation</a>. Construction
              must be based only on the information available in the <a id="id2763315" class="indexterm"></a><a class="link" href="#representation//">representation</a>, and not on
              additional <a id="id2763326" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> or <a id="id2763337" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
              details</a> such as <a id="id2763350" class="indexterm"></a><a class="link" href="#comment//">comments</a>, <a id="id2763360" class="indexterm"></a><a class="link" href="#directive//">directives</a>, <a id="id2763371" class="indexterm"></a><a class="link" href="#key/order/">mapping key order</a>, <a id="id2763383" class="indexterm"></a><a class="link" href="#style//">node styles</a>, <a id="id2763394" class="indexterm"></a><a class="link" href="#scalar/content%20format/">scalar content format</a>,
              <a id="id2763406" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> levels etc.
              Construction can fail due to the <a id="id2763420" class="indexterm"></a><a class="link" href="#tag/unavailable/">unavailability</a> of the required
              <a id="id2763433" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
              types</a>.
            </dd>
              </dl>
            </div>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2763452"></a>3.2.&nbsp;Information Models</h2>
              </div>
            </div>
          </div>
          <p>
        This section specifies the formal details of the results of the above
        processes. To maximize data portability between programming languages
        and implementations, users of YAML should be mindful of the distinction
        between <a id="id2763464" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> or
        <a id="id2763474" class="indexterm"></a><a class="link" href="#presentation//">presentation</a> properties and
        those which are part of the YAML <a id="id2763486" class="indexterm"></a><a class="link" href="#representation//">representation</a>. Thus, while imposing
        a <a id="id2763497" class="indexterm"></a><a class="link" href="#key/order/">order</a> on <a id="id2763509" class="indexterm"></a><a class="link" href="#key//">mapping keys</a> is necessary for flattening YAML
        <a id="id2763520" class="indexterm"></a><a class="link" href="#representation//">representations</a> to a
        sequential access medium, this <a id="id2763532" class="indexterm"></a><a class="link" href="#serialization/detail/">serialization detail</a> must not be used to
        convey <a id="id2763545" class="indexterm"></a><a class="link" href="#application//">application</a> level
        information. In a similar manner, while <a id="id2763556" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> technique and a choice of
        a <a id="id2763570" class="indexterm"></a><a class="link" href="#style//">node style</a> are needed for the
        human readability, these <a id="id2763581" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation details</a> are neither part of
        the YAML <a id="id2763595" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> nor
        the YAML <a id="id2763605" class="indexterm"></a><a class="link" href="#representation//">representation</a>. By
        carefully separating properties needed for <a id="id2763616" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> and <a id="id2763627" class="indexterm"></a><a class="link" href="#presentation//">presentation</a>, YAML <a id="id2763637" class="indexterm"></a><a class="link" href="#representation//">representations</a> of <a id="id2763648" class="indexterm"></a><a class="link" href="#application//">application</a> information will be
        consistent and portable between various programming environments.
      </p>
          <p>
        The following diagram summarizes the three <a id="id2763664" class="indexterm"></a><a id="information model//"></a><em class="firstterm">information models</em>. Full arrows
        denote composition, hollow arrows denote inheritance,
        “<span class="quote"><strong class="userinput"><code>1</code></strong></span>” and “<span class="quote"><strong class="userinput"><code>*</code></strong></span>” denote “<span class="quote">one</span>” and
        “<span class="quote">many</span>” relationships. A single “<span class="quote"><strong class="userinput"><code>+</code></strong></span>” denotes
        <a id="id2763702" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> details, a
        double “<span class="quote"><strong class="userinput"><code>++</code></strong></span>” denotes <a id="id2763719" class="indexterm"></a><a class="link" href="#presentation//">presentation</a> details.
      </p>
          <div class="figure">
            <a id="id2763731"></a>
            <p class="title">
              <b>Figure&nbsp;3.2.&nbsp;Information Models</b>
            </p>
            <div class="figure-contents">
              <div class="mediaobject">
                <img src="model2.png" alt="Information Models">
              </div>
            </div>
          </div>
          <br class="figure-break">
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2763754"></a>3.2.1.&nbsp;Representation Graph</h3>
                </div>
              </div>
            </div>
            <p>
          YAML’s <a id="id2763762" class="indexterm"></a><a id="representation//"></a><em class="firstterm">representation</em>
          of <a id="id2763773" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
          structure</a> is a rooted, connected, directed graph of
          <a id="id2763786" class="indexterm"></a><a class="link" href="#tag//">tagged</a> <a id="id2763796" class="indexterm"></a><a class="link" href="#node//">nodes</a>. By “<span class="quote">directed graph</span>” we
          mean a set of <a id="id2763810" class="indexterm"></a><a class="link" href="#node//">nodes</a> and directed
          edges (“<span class="quote">arrows</span>”), where each edge connects one <a id="id2763825" class="indexterm"></a><a class="link" href="#node//">node</a> to another (see <a class="ulink" href="http://www.nist.gov/dads/HTML/directedGraph.html" target="_top">a formal
          definition</a>). All the <a id="id2763842" class="indexterm"></a><a class="link" href="#node//">nodes</a>
          must be reachable from the <a id="id2763854" class="indexterm"></a><a id="node/root/"></a><em class="firstterm">root node</em> via such edges. Note that the
          YAML graph may include cycles, and a <a id="id2763869" class="indexterm"></a><a class="link" href="#node//">node</a> may have more than one incoming edge.
        </p>
            <p>
          <a id="id2763883" class="indexterm"></a><a class="link" href="#node//">Nodes</a> that are defined in terms of
          other <a id="id2763894" class="indexterm"></a><a class="link" href="#node//">nodes</a> are <a id="id2763905" class="indexterm"></a><a class="link" href="#collection//">collections</a>; <a id="id2763915" class="indexterm"></a><a class="link" href="#node//">nodes</a> that are independent of any other
          <a id="id2763927" class="indexterm"></a><a class="link" href="#node//">nodes</a> are <a id="id2763937" class="indexterm"></a><a class="link" href="#scalar//">scalars</a>. YAML supports two <a id="id2763947" class="indexterm"></a><a class="link" href="#kind//">kinds</a> of <a id="id2763958" class="indexterm"></a><a class="link" href="#collection//">collection nodes</a>: <a id="id2763968" class="indexterm"></a><a class="link" href="#sequence//">sequences</a> and <a id="id2763979" class="indexterm"></a><a class="link" href="#mapping//">mappings</a>. <a id="id2763989" class="indexterm"></a><a class="link" href="#mapping//">Mapping nodes</a> are somewhat tricky because
          their <a id="id2764000" class="indexterm"></a><a class="link" href="#key//">keys</a> are unordered and must be
          <a id="id2764012" class="indexterm"></a><a class="link" href="#equality//">unique</a>.
        </p>
            <div class="figure">
              <a id="id2764023"></a>
              <p class="title">
                <b>Figure&nbsp;3.3.&nbsp;Representation Model</b>
              </p>
              <div class="figure-contents">
                <div class="mediaobject">
                  <img src="represent2.png" alt="Representation Model">
                </div>
              </div>
            </div>
            <br class="figure-break">
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2764044"></a>3.2.1.1.&nbsp;Nodes</h4>
                  </div>
                </div>
              </div>
              <p>
            A YAML <a id="id2764051" class="indexterm"></a><a id="node//"></a><em class="firstterm">node</em> <a id="id2764063" class="indexterm"></a><a class="link" href="#representation//">represents</a> a single <a id="id2764073" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structure</a>.
            Such nodes have <a id="id2764084" class="indexterm"></a><a id="content//"></a><em class="firstterm">content</em> of one
            of three <a id="id2764096" class="indexterm"></a><a id="kind//"></a><em class="firstterm">kinds</em>: scalar, sequence,
            or mapping. In addition, each node has a <a id="id2764109" class="indexterm"></a><a class="link" href="#tag//">tag</a> which serves to restrict the set of
            possible values the content can have.
          </p>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Scalar</span>
                  </dt>
                  <dd>
                The content of a <a id="id2764133" class="indexterm"></a><a id="scalar//"></a><em class="firstterm">scalar</em>
                node is an opaque datum that can be <a id="id2764145" class="indexterm"></a><a class="link" href="#present//">presented</a> as a series of zero or
                more Unicode characters.
              </dd>
                  <dt>
                    <span class="term">Sequence</span>
                  </dt>
                  <dd>
                The content of a <a id="id2764167" class="indexterm"></a><a id="sequence//"></a><em class="firstterm">sequence</em>
                node is an ordered series of zero or more nodes. In particular,
                a sequence may contain the same node more than once. It could
                even contain itself (directly or indirectly).
              </dd>
                </dl>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Mapping</span>
                  </dt>
                  <dd>
                The content of a <a id="id2764196" class="indexterm"></a><a id="mapping//"></a><em class="firstterm">mapping</em>
                node is an unordered set of <a id="id2764209" class="indexterm"></a><a id="key//"></a><em class="firstterm">key:</em>&nbsp;<a id="id2764220" class="indexterm"></a><a id="value//"></a><em class="firstterm">value</em> node <a id="id2764232" class="indexterm"></a><a id="key: value pair//"></a><em class="firstterm">pairs</em>, with the restriction that each of
                the keys is <a id="id2764246" class="indexterm"></a><a class="link" href="#equality//">unique</a>. YAML
                places no further restrictions on the nodes. In particular,
                keys may be arbitrary nodes, the same node may be used as the
                value of several key:&nbsp;value pairs, and a mapping could
                even contain itself as a key or a value (directly or
                indirectly).
              </dd>
                </dl>
              </div>
              <p>
            When appropriate, it is convenient to consider sequences and
            mappings together, as <a id="id2764275" class="indexterm"></a><a id="collection//"></a><em class="firstterm">collections</em>. In this view, sequences
            are treated as mappings with integer keys starting at zero. Having
            a unified collections view for sequences and mappings is helpful
            both for theoretical analysis and for creating practical YAML tools
            and APIs. This strategy is also used by the Javascript programming
            language.
          </p>
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2764295"></a>3.2.1.2.&nbsp;Tags</h4>
                  </div>
                </div>
              </div>
              <p>
            YAML <a id="id2764302" class="indexterm"></a><a class="link" href="#represent//">represents</a> type
            information of <a id="id2764313" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
            structures</a> with a simple identifier, called a <a id="id2764325" class="indexterm"></a><a id="tag//"></a><em class="firstterm">tag</em>. <a id="id2764336" class="indexterm"></a><a id="tag/global/"></a><em class="firstterm">Global tags</em> are <a class="ulink" href="http://www.ietf.org/rfc/rfc2396.txt" target="_top">URIs</a> and hence
            globally unique across all <a id="id2764357" class="indexterm"></a><a class="link" href="#application//">applications</a>. The
            “<span class="quote"><strong class="userinput"><code>tag:</code></strong></span>” <a class="ulink" href="http://www.faqs.org/rfcs/rfc4151.html" target="_top">URI scheme</a> is
            recommended for all global YAML tags. In contrast, <a id="id2764380" class="indexterm"></a><a id="tag/local/"></a><em class="firstterm">local tags</em> are specific
            to a single <a id="id2764395" class="indexterm"></a><a class="link" href="#application//">application</a>.
            Local tags start with <a id="id2764406" class="indexterm"></a><a id="! tag indicator/! local tag/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</em>, are not URIs
            and are not expected to be globally unique. YAML provides a
            <a id="id2764428" class="indexterm"></a><a class="link" href="#directive/TAG/">“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”
            directive</a> to make tag notation less verbose; it also
            offers easy migration from local to global tags. To ensure this,
            local tags are restricted to the URI character set and use URI
            character <a id="id2764449" class="indexterm"></a><a class="link" href="#%%20escaping%20in%20URI//">escaping</a>.
          </p>
              <p>
            YAML does not mandate any special relationship between different
            tags that begin with the same substring. Tags ending with URI
            fragments (containing “<span class="quote"><strong class="userinput"><code>#</code></strong></span>”) are no exception; tags
            that share the same base URI but differ in their fragment part are
            considered to be different, independent tags. By convention,
            fragments are used to identify different “<span class="quote">variants</span>” of
            a tag, while “<span class="quote"><strong class="userinput"><code>/</code></strong></span>” is used to define nested tag
            “<span class="quote">namespace</span>” hierarchies. However, this is merely a
            convention, and each tag may employ its own rules. For example,
            Perl tags may use “<span class="quote"><strong class="userinput"><code>::</code></strong></span>” to express namespace
            hierarchies, Java tags may use “<span class="quote"><strong class="userinput"><code>.</code></strong></span>”, etc.
          </p>
              <p>
            YAML tags are used to associate meta information with each <a id="id2764510" class="indexterm"></a><a class="link" href="#node//">node</a>. In particular, each tag must specify
            the expected <a id="id2764522" class="indexterm"></a><a class="link" href="#kind//">node kind</a> (<a id="id2764532" class="indexterm"></a><a class="link" href="#scalar//">scalar</a>, <a id="id2764543" class="indexterm"></a><a class="link" href="#sequence//">sequence</a>, or <a id="id2764553" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>). <a id="id2764564" class="indexterm"></a><a class="link" href="#scalar//">Scalar</a> tags must also provide a
            mechanism for converting <a id="id2764575" class="indexterm"></a><a class="link" href="#scalar/content%20format/">formatted content</a> to a
            <a id="id2764588" class="indexterm"></a><a class="link" href="#scalar/canonical%20form/">canonical
            form</a> for supporting <a id="id2764600" class="indexterm"></a><a class="link" href="#equality//">equality</a> testing. Furthermore, a tag
            may provide additional information such as the set of allowed
            <a id="id2764613" class="indexterm"></a><a class="link" href="#content//">content</a> values for validation,
            a mechanism for <a id="id2764624" class="indexterm"></a><a class="link" href="#tag/resolution/">tag
            resolution</a>, or any other data that is applicable to all
            of the tag’s <a id="id2764639" class="indexterm"></a><a class="link" href="#node//">nodes</a>.
          </p>
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2764652"></a>3.2.1.3.&nbsp;Node Comparison</h4>
                  </div>
                </div>
              </div>
              <p>
            Since YAML <a id="id2764659" class="indexterm"></a><a class="link" href="#mapping//">mappings</a> require
            <a id="id2764670" class="indexterm"></a><a class="link" href="#key//">key</a> uniqueness, <a id="id2764680" class="indexterm"></a><a class="link" href="#representation//">representations</a> must include a
            mechanism for testing the equality of <a id="id2764692" class="indexterm"></a><a class="link" href="#node//">nodes</a>. This is non-trivial since YAML
            allows various ways to <a id="id2764703" class="indexterm"></a><a class="link" href="#scalar/content%20format/">format scalar content</a>. For example, the integer
            eleven can be written as “<span class="quote"><strong class="userinput"><code>0o13</code></strong></span>” (octal) or
            “<span class="quote"><strong class="userinput"><code>0xB</code></strong></span>” (hexadecimal). If both notations are used as
            <a id="id2764731" class="indexterm"></a><a class="link" href="#key//">keys</a> in the same <a id="id2764742" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>, only a YAML <a id="id2764752" class="indexterm"></a><a class="link" href="#processor//">processor</a> which recognizes integer
            <a id="id2764763" class="indexterm"></a><a class="link" href="#scalar/content%20format/">formats</a> would correctly flag the duplicate
            <a id="id2764777" class="indexterm"></a><a class="link" href="#key//">key</a> as an error.
          </p>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Canonical Form</span>
                  </dt>
                  <dd>
                YAML supports the need for <a id="id2764799" class="indexterm"></a><a class="link" href="#scalar//">scalar</a> equality by requiring that
                every <a id="id2764811" class="indexterm"></a><a class="link" href="#scalar//">scalar</a>&nbsp;<a id="id2764821" class="indexterm"></a><a class="link" href="#tag//">tag</a> must specify a mechanism for
                producing the <a id="id2764833" class="indexterm"></a><a id="scalar/canonical form/"></a><em class="firstterm">canonical form</em> of any <a id="id2764847" class="indexterm"></a><a class="link" href="#scalar/content%20format/">formatted content</a>. This
                form is a Unicode character string which also <a id="id2764864" class="indexterm"></a><a class="link" href="#present//">presents</a> the same <a id="id2764876" class="indexterm"></a><a class="link" href="#scalar/content%20format/">content</a>,
                and can be used for equality testing. While this requirement is
                stronger than a well defined equality operator, it has other
                uses, such as the production of digital signatures.
              </dd>
                  <dt>
                    <span class="term">Equality</span>
                  </dt>
                  <dd>
                    <p>
                  Two <a id="id2764908" class="indexterm"></a><a class="link" href="#node//">nodes</a> must have the
                  same <a id="id2764923" class="indexterm"></a><a class="link" href="#tag//">tag</a> and <a id="id2764935" class="indexterm"></a><a class="link" href="#content//">content</a> to be <a id="id2764948" class="indexterm"></a><a id="equality//"></a><em class="firstterm">equal</em>. Since each <a id="id2764962" class="indexterm"></a><a class="link" href="#tag//">tag</a> applies to exactly one <a id="id2764974" class="indexterm"></a><a class="link" href="#kind//">kind</a>, this implies that the two
                  <a id="id2764988" class="indexterm"></a><a class="link" href="#node//">nodes</a> must have the same
                  <a id="id2765000" class="indexterm"></a><a class="link" href="#kind//">kind</a> to be equal. Two
                  <a id="id2765013" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> are equal only
                  when their <a id="id2765026" class="indexterm"></a><a class="link" href="#tag//">tags</a> and
                  canonical forms are equal character-by-character. Equality
                  of <a id="id2765040" class="indexterm"></a><a class="link" href="#collection//">collections</a> is
                  defined recursively. Two <a id="id2765054" class="indexterm"></a><a class="link" href="#sequence//">sequences</a> are equal only when
                  they have the same <a id="id2765068" class="indexterm"></a><a class="link" href="#tag//">tag</a> and
                  length, and each <a id="id2765080" class="indexterm"></a><a class="link" href="#node//">node</a> in
                  one <a id="id2765093" class="indexterm"></a><a class="link" href="#sequence//">sequence</a> is equal
                  to the corresponding <a id="id2765106" class="indexterm"></a><a class="link" href="#node//">node</a>
                  in the other <a id="id2765120" class="indexterm"></a><a class="link" href="#sequence//">sequence</a>.
                  Two <a id="id2765132" class="indexterm"></a><a class="link" href="#mapping//">mappings</a> are equal
                  only when they have the same <a id="id2765146" class="indexterm"></a><a class="link" href="#tag//">tag</a> and an equal set of <a id="id2765159" class="indexterm"></a><a class="link" href="#key//">keys</a>, and each <a id="id2765171" class="indexterm"></a><a class="link" href="#key//">key</a> in this set is associated with
                  equal <a id="id2765184" class="indexterm"></a><a class="link" href="#value//">values</a> in both
                  <a id="id2765197" class="indexterm"></a><a class="link" href="#mapping//">mappings</a>.
                </p>
                    <p>
                  Different URI schemes may define different rules for testing
                  the equality of URIs. Since a YAML <a id="id2765215" class="indexterm"></a><a class="link" href="#processor//">processor</a> cannot be reasonably
                  expected to be aware of them all, it must resort to a simple
                  character-by-character comparison of <a id="id2765230" class="indexterm"></a><a class="link" href="#tag//">tags</a> to ensure consistency. This also
                  happens to be the comparison method defined by the
                  “<span class="quote"><strong class="userinput"><code>tag:</code></strong></span>” URI scheme. <a id="id2765252" class="indexterm"></a><a class="link" href="#tag//">Tags</a> in a YAML stream must therefore
                  be <a id="id2765265" class="indexterm"></a><a class="link" href="#present//">presented</a> in a
                  canonical way so that such comparison would yield the correct
                  results.
                </p>
                  </dd>
                  <dt>
                    <span class="term">Identity</span>
                  </dt>
                  <dd>
                Two <a id="id2765291" class="indexterm"></a><a class="link" href="#node//">nodes</a> are <a id="id2765304" class="indexterm"></a><a id="identity//"></a><em class="firstterm">identical</em> only when they <a id="id2765318" class="indexterm"></a><a class="link" href="#represent//">represent</a> the same <a id="id2765330" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
                structure</a>. Typically, this corresponds to a single
                memory address. Identity should not be confused with equality;
                two equal <a id="id2765347" class="indexterm"></a><a class="link" href="#node//">nodes</a> need not have
                the same identity. A YAML <a id="id2765361" class="indexterm"></a><a class="link" href="#processor//">processor</a> may treat equal
                <a id="id2765374" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> as if they were
                identical. In contrast, the separate identity of two distinct
                but equal <a id="id2765388" class="indexterm"></a><a class="link" href="#collection//">collections</a>
                must be preserved.
              </dd>
                </dl>
              </div>
            </div>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2765410"></a>3.2.2.&nbsp;Serialization Tree</h3>
                </div>
              </div>
            </div>
            <p>
          To express a YAML <a id="id2765418" class="indexterm"></a><a class="link" href="#representation//">representation</a> using a serial API,
          it is necessary to impose an <a id="id2765432" class="indexterm"></a><a class="link" href="#key/order/">order</a> on <a id="id2765447" class="indexterm"></a><a class="link" href="#key//">mapping
          keys</a> and employ <a id="id2765459" class="indexterm"></a><a class="link" href="#alias//">alias
          nodes</a> to indicate a subsequent occurrence of a previously
          encountered <a id="id2765473" class="indexterm"></a><a class="link" href="#node//">node</a>. The result of
          this process is a <a id="id2765486" class="indexterm"></a><a id="serialization//"></a><em class="firstterm">serialization
          tree</em>, where each <a id="id2765501" class="indexterm"></a><a class="link" href="#node//">node</a> has
          an ordered set of children. This tree can be traversed for a serial
          event-based API. <a id="id2765515" class="indexterm"></a><a class="link" href="#construct//">Construction</a>
          of <a id="id2765529" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
          structures</a> from the serial interface should not use
          <a id="id2765544" class="indexterm"></a><a class="link" href="#key/order/">key order</a> or
          <a id="id2765558" class="indexterm"></a><a class="link" href="#anchor//">anchor names</a> for the preservation
          of <a id="id2765572" class="indexterm"></a><a class="link" href="#application//">application</a> data.
        </p>
            <div class="figure">
              <a id="id2765586"></a>
              <p class="title">
                <b>Figure&nbsp;3.4.&nbsp;Serialization Model</b>
              </p>
              <div class="figure-contents">
                <div class="mediaobject">
                  <img src="serialize2.png" alt="Serialization Model">
                </div>
              </div>
            </div>
            <br class="figure-break">
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2765608"></a>3.2.2.1.&nbsp;Keys Order</h4>
                  </div>
                </div>
              </div>
              <p>
            In the <a id="id2765615" class="indexterm"></a><a class="link" href="#representation//">representation</a>
            model, <a id="id2765629" class="indexterm"></a><a class="link" href="#key//">mapping keys</a> do not have an
            order. To <a id="id2765642" class="indexterm"></a><a class="link" href="#serialize//">serialize</a> a
            <a id="id2765655" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>, it is necessary to
            impose an <a id="id2765668" class="indexterm"></a><a id="key/order/"></a><em class="firstterm">ordering</em> on its <a id="id2765684" class="indexterm"></a><a class="link" href="#key//">keys</a>. This order is a <a id="id2765696" class="indexterm"></a><a class="link" href="#serialization/detail/">serialization detail</a> and should not be
            used when <a id="id2765713" class="indexterm"></a><a class="link" href="#compose//">composing</a> the
            <a id="id2765725" class="indexterm"></a><a class="link" href="#representation//">representation graph</a>
            (and hence for the preservation of <a id="id2765740" class="indexterm"></a><a class="link" href="#application//">application</a> data). In every case
            where <a id="id2765753" class="indexterm"></a><a class="link" href="#node//">node</a> order is significant,
            a <a id="id2765766" class="indexterm"></a><a class="link" href="#sequence//">sequence</a> must be used. For
            example, an ordered <a id="id2765779" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>
            can be <a id="id2765792" class="indexterm"></a><a class="link" href="#represent//">represented</a> as a
            <a id="id2765805" class="indexterm"></a><a class="link" href="#sequence//">sequence</a> of <a id="id2765818" class="indexterm"></a><a class="link" href="#mapping//">mappings</a>, where each <a id="id2765831" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> is a single <a id="id2765843" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pair</a>. YAML
            provides convenient <a id="id2765858" class="indexterm"></a><a class="link" href="#style/single%20key:value%20pair%20mapping/">compact notation</a> for
            this case.
          </p>
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2765878"></a>3.2.2.2.&nbsp;Anchors and Aliases</h4>
                  </div>
                </div>
              </div>
              <p>
            In the <a id="id2765886" class="indexterm"></a><a class="link" href="#representation//">representation
            graph</a>, a <a id="id2765900" class="indexterm"></a><a class="link" href="#node//">node</a> may
            appear in more than one <a id="id2765913" class="indexterm"></a><a class="link" href="#collection//">collection</a>. When <a id="id2765926" class="indexterm"></a><a class="link" href="#serialize//">serializing</a> such data, the first
            occurrence of the <a id="id2765939" class="indexterm"></a><a class="link" href="#node//">node</a> is
            <a id="id2765952" class="indexterm"></a><a id="alias/identified/"></a><em class="firstterm">identified</em> by an <a id="id2765969" class="indexterm"></a><a id="anchor//"></a><em class="firstterm">anchor</em>. Each subsequent occurrence is
            <a id="id2765983" class="indexterm"></a><a class="link" href="#serialize//">serialized</a> as an <a id="id2765995" class="indexterm"></a><a class="link" href="#alias//">alias node</a> which refers back to this
            anchor. Otherwise, anchor names are a <a id="id2766009" class="indexterm"></a><a class="link" href="#serialization/detail/">serialization
            detail</a> and are discarded once <a id="id2766025" class="indexterm"></a><a class="link" href="#compose//">composing</a> is completed. When <a id="id2766038" class="indexterm"></a><a class="link" href="#compose//">composing</a> a <a id="id2766051" class="indexterm"></a><a class="link" href="#representation//">representation graph</a> from
            <a id="id2766064" class="indexterm"></a><a class="link" href="#serialize//">serialized</a> events, an alias
            node refers to the most recent <a id="id2766078" class="indexterm"></a><a class="link" href="#node//">node</a> in the <a id="id2766090" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> having the
            specified anchor. Therefore, anchors need not be unique within a
            <a id="id2766105" class="indexterm"></a><a class="link" href="#serialization//">serialization</a>. In
            addition, an anchor need not have an alias node referring to it. It
            is therefore possible to provide an anchor for all <a id="id2766121" class="indexterm"></a><a class="link" href="#node//">nodes</a> in <a id="id2766134" class="indexterm"></a><a class="link" href="#serialization//">serialization</a>.
          </p>
            </div>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2766150"></a>3.2.3.&nbsp;Presentation Stream</h3>
                </div>
              </div>
            </div>
            <p>
          A YAML <a id="id2766158" class="indexterm"></a><a id="presentation//"></a><em class="firstterm">presentation</em> is a
          <a id="id2766173" class="indexterm"></a><a class="link" href="#stream//">stream</a> of Unicode characters
          making use of of <a id="id2766186" class="indexterm"></a><a class="link" href="#style//">styles</a>, <a id="id2766198" class="indexterm"></a><a class="link" href="#scalar/content%20format/">scalar content
          formats</a>, <a id="id2766215" class="indexterm"></a><a class="link" href="#comment//">comments</a>,
          <a id="id2766228" class="indexterm"></a><a class="link" href="#directive//">directives</a> and other <a id="id2766240" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
          details</a> to <a id="id2766256" class="indexterm"></a><a class="link" href="#present//">present</a> a
          YAML <a id="id2766269" class="indexterm"></a><a class="link" href="#serialization//">serialization</a> in a
          human readable way. Although a YAML <a id="id2766283" class="indexterm"></a><a class="link" href="#processor//">processor</a> may provide these <a id="id2766296" class="indexterm"></a><a class="link" href="#presentation/detail/">details</a> when
          <a id="id2766312" class="indexterm"></a><a class="link" href="#parse//">parsing</a>, they should not be
          reflected in the resulting <a id="id2766326" class="indexterm"></a><a class="link" href="#serialization//">serialization</a>. YAML allows several
          <a id="id2766339" class="indexterm"></a><a class="link" href="#serialization//">serialization trees</a> to be
          contained in the same YAML character stream, as a series of <a id="id2766354" class="indexterm"></a><a class="link" href="#document//">documents</a> separated by <a id="id2766367" class="indexterm"></a><a class="link" href="#marker//">markers</a>. Documents appearing in the same
          stream are independent; that is, a <a id="id2766381" class="indexterm"></a><a class="link" href="#node//">node</a> must not appear in more than one
          <a id="id2766395" class="indexterm"></a><a class="link" href="#serialization//">serialization tree</a> or
          <a id="id2766408" class="indexterm"></a><a class="link" href="#representation//">representation graph</a>.
        </p>
            <div class="figure">
              <a id="id2766423"></a>
              <p class="title">
                <b>Figure&nbsp;3.5.&nbsp;Presentation Model</b>
              </p>
              <div class="figure-contents">
                <div class="mediaobject">
                  <img src="present2.png" alt="Presentation Model">
                </div>
              </div>
            </div>
            <br class="figure-break">
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2766446"></a>3.2.3.1.&nbsp;Node Styles</h4>
                  </div>
                </div>
              </div>
              <p>
            Each <a id="id2766454" class="indexterm"></a><a class="link" href="#node//">node</a> is presented in some
            <a id="id2766468" class="indexterm"></a><a id="style//"></a><em class="firstterm">style</em>, depending on its <a id="id2766482" class="indexterm"></a><a class="link" href="#kind//">kind</a>. The node style is a <a id="id2766495" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
            detail</a> and is not reflected in the <a id="id2766512" class="indexterm"></a><a class="link" href="#serialization//">serialization tree</a> or <a id="id2766525" class="indexterm"></a><a class="link" href="#representation//">representation graph</a>. There are
            two groups of styles. <a id="id2766539" class="indexterm"></a><a class="link" href="#style/block/">Block styles</a> use <a id="id2766554" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> to
            denote structure; In contrast, <a id="id2766570" class="indexterm"></a><a class="link" href="#style/flow/">flow styles</a> styles rely on explicit
            <a id="id2766586" class="indexterm"></a><a class="link" href="#indicator//">indicators</a>.
          </p>
              <p>
            YAML provides a rich set of <a id="id2766602" class="indexterm"></a><a id="style/scalar/"></a><em class="firstterm">scalar styles</em>. <a id="id2766619" class="indexterm"></a><a class="link" href="#style/block/scalar">Block
            scalar</a> styles include the <a id="id2766639" class="indexterm"></a><a class="link" href="#style/block/literal">literal style</a> and
            the <a id="id2766657" class="indexterm"></a><a class="link" href="#style/block/folded">folded style</a>. <a id="id2766674" class="indexterm"></a><a class="link" href="#style/flow/scalar">Flow scalar</a> styles
            include the <a id="id2766693" class="indexterm"></a><a class="link" href="#style/flow/plain">plain style</a> and two quoted styles, the
            <a id="id2766711" class="indexterm"></a><a class="link" href="#style/flow/single-quoted">single-quoted style</a> and the
            <a id="id2766731" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted style</a>. These
            styles offer a range of trade-offs between expressive power and
            readability.
          </p>
              <p>
            Normally, <a id="id2766755" class="indexterm"></a><a class="link" href="#style/block/sequence">block sequences</a> and <a id="id2766773" class="indexterm"></a><a class="link" href="#style/block/mapping">mappings</a> begin on the next line. In
            some cases, YAML also allows nested <a id="id2766794" class="indexterm"></a><a class="link" href="#style/block/">block</a> <a id="id2766809" class="indexterm"></a><a class="link" href="#collection//">collections</a> to start in-line for a
            more <a id="id2766822" class="indexterm"></a><a class="link" href="#style/compact%20block%20collection/">compact
            notation</a>. In addition, YAML provides a <a id="id2766839" class="indexterm"></a><a class="link" href="#style/single%20key:value%20pair%20mapping/">compact
            notation</a> for <a id="id2766857" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow mappings</a> with a single <a id="id2766875" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pair</a>, nested
            inside a <a id="id2766889" class="indexterm"></a><a class="link" href="#style/flow/sequence">flow sequence</a>. These allow for a
            natural “<span class="quote">ordered mapping</span>” notation.
          </p>
              <div class="figure">
                <a id="id2766911"></a>
                <p class="title">
                  <b>Figure&nbsp;3.6.&nbsp;Kind/Style Combinations</b>
                </p>
                <div class="figure-contents">
                  <div class="mediaobject">
                    <img src="styles2.png" alt="Kind/Style Combinations">
                  </div>
                </div>
              </div>
              <br class="figure-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2766934"></a>3.2.3.2.&nbsp;Scalar Formats</h4>
                  </div>
                </div>
              </div>
              <p>
            YAML allows <a id="id2766943" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> to be
            <a id="id2766955" class="indexterm"></a><a class="link" href="#present//">presented</a> in several <a id="id2766968" class="indexterm"></a><a id="scalar/content format/"></a><em class="firstterm">formats</em>. For
            example, the integer “<span class="quote"><strong class="userinput"><code>11</code></strong></span>” might also be written as
            “<span class="quote"><strong class="userinput"><code>0xB</code></strong></span>”. <a id="id2767000" class="indexterm"></a><a class="link" href="#tag//">Tags</a> must
            specify a mechanism for converting the formatted content to a
            <a id="id2767014" class="indexterm"></a><a class="link" href="#scalar/canonical%20form/">canonical
            form</a> for use in <a id="id2767029" class="indexterm"></a><a class="link" href="#equality//">equality</a> testing. Like <a id="id2767042" class="indexterm"></a><a class="link" href="#style//">node style</a>, the format is a <a id="id2767055" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
            detail</a> and is not reflected in the <a id="id2767072" class="indexterm"></a><a class="link" href="#serialization//">serialization tree</a> and <a id="id2767085" class="indexterm"></a><a class="link" href="#representation//">representation graph</a>.
          </p>
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2767100"></a>3.2.3.3.&nbsp;Comments</h4>
                  </div>
                </div>
              </div>
              <p>
            <a id="id2767108" class="indexterm"></a><a class="link" href="#comment//">Comments</a> are a <a id="id2767121" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
            detail</a> and must not have any effect on the <a id="id2767138" class="indexterm"></a><a class="link" href="#serialization//">serialization tree</a> or <a id="id2767151" class="indexterm"></a><a class="link" href="#representation//">representation graph</a>. In
            particular, comments are not associated with a particular <a id="id2767165" class="indexterm"></a><a class="link" href="#node//">node</a>. The usual purpose of a comment is to
            communicate between the human maintainers of a file. A typical
            example is comments in a configuration file. Comments must not
            appear inside <a id="id2767181" class="indexterm"></a><a class="link" href="#scalar//">scalars</a>, but may
            be interleaved with such <a id="id2767194" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> inside <a id="id2767207" class="indexterm"></a><a class="link" href="#collection//">collections</a>.
          </p>
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2767222"></a>3.2.3.4.&nbsp;Directives</h4>
                  </div>
                </div>
              </div>
              <p>
            Each <a id="id2767230" class="indexterm"></a><a class="link" href="#document//">document</a> may be
            associated with a set of <a id="id2767244" class="indexterm"></a><a class="link" href="#directive//">directives</a>. A directive has a name
            and an optional sequence of parameters. Directives are instructions
            to the YAML <a id="id2767258" class="indexterm"></a><a class="link" href="#processor//">processor</a>, and
            like all other <a id="id2767271" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation details</a> are not reflected
            in the YAML <a id="id2767288" class="indexterm"></a><a class="link" href="#serialization//">serialization
            tree</a> or <a id="id2767302" class="indexterm"></a><a class="link" href="#representation//">representation
            graph</a>. This version of YAML defines a two directives,
            <a id="id2767316" class="indexterm"></a><a class="link" href="#directive/YAML/">“<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>”</a> and <a id="id2767337" class="indexterm"></a><a class="link" href="#directive/TAG/">“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”</a>.
            All other directives are <a id="id2767357" class="indexterm"></a><a class="link" href="#directive/reserved/">reserved</a> for future versions of
            YAML.
          </p>
            </div>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2767381"></a>3.3.&nbsp;Loading Failure Points</h2>
              </div>
            </div>
          </div>
          <p>
        The process of <a id="id2767389" class="indexterm"></a><a class="link" href="#load//">loading</a> <a id="id2767401" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a> from a
        YAML <a id="id2767415" class="indexterm"></a><a class="link" href="#stream//">stream</a> has several potential
        <a id="id2767428" class="indexterm"></a><a id="load/failure point/"></a><em class="firstterm">failure
        points</em>. The character <a id="id2767446" class="indexterm"></a><a class="link" href="#stream//">stream</a> may be <a id="id2767458" class="indexterm"></a><a class="link" href="#stream/ill-formed/">ill-formed</a>, <a id="id2767474" class="indexterm"></a><a class="link" href="#alias//">aliases</a> may be <a id="id2767486" class="indexterm"></a><a class="link" href="#alias/unidentified/">unidentified</a>, <a id="id2767502" class="indexterm"></a><a class="link" href="#tag/non-specific/">unspecified tags</a> may be <a id="id2767517" class="indexterm"></a><a class="link" href="#tag/unresolved/">unresolvable</a>, <a id="id2767533" class="indexterm"></a><a class="link" href="#tag//">tags</a> may be <a id="id2767545" class="indexterm"></a><a class="link" href="#tag/unrecognized/">unrecognized</a>, the <a id="id2767562" class="indexterm"></a><a class="link" href="#content//">content</a> may be <a id="id2767574" class="indexterm"></a><a class="link" href="#invalid%20content//">invalid</a>, and a native type may be <a id="id2767590" class="indexterm"></a><a class="link" href="#tag/unavailable/">unavailable</a>. Each of
        these failures results with an incomplete loading.
      </p>
          <p>
        A <a id="id2767609" class="indexterm"></a><a id="representation/partial/"></a><em class="firstterm">partial
        representation</em> need not <a id="id2767626" class="indexterm"></a><a class="link" href="#tag/resolution/">resolve</a> the <a id="id2767642" class="indexterm"></a><a class="link" href="#tag//">tag</a> of each <a id="id2767654" class="indexterm"></a><a class="link" href="#node//">node</a>, and the
        <a id="id2767666" class="indexterm"></a><a class="link" href="#scalar/canonical%20form/">canonical
        form</a> of <a id="id2767682" class="indexterm"></a><a class="link" href="#scalar/content%20format/">formatted scalar content</a> need not be available. This
        weaker representation is useful for cases of incomplete knowledge of
        the types used in the <a id="id2767701" class="indexterm"></a><a class="link" href="#document//">document</a>.
        In contrast, a <a id="id2767713" class="indexterm"></a><a id="representation/complete/"></a><em class="firstterm">complete representation</em> specifies the
        <a id="id2767731" class="indexterm"></a><a class="link" href="#tag//">tag</a> of each <a id="id2767744" class="indexterm"></a><a class="link" href="#node//">node</a>, and provides the <a id="id2767756" class="indexterm"></a><a class="link" href="#scalar/canonical%20form/">canonical form</a> of
        <a id="id2767773" class="indexterm"></a><a class="link" href="#scalar/content%20format/">formatted scalar
        content</a>, allowing for <a id="id2767789" class="indexterm"></a><a class="link" href="#equality//">equality</a> testing. A complete
        representation is required in order to <a id="id2767803" class="indexterm"></a><a class="link" href="#construct//">construct</a> <a id="id2767815" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a>.
      </p>
          <div class="figure">
            <a id="id2767830"></a>
            <p class="title">
              <b>Figure&nbsp;3.7.&nbsp;Loading Failure Points</b>
            </p>
            <div class="figure-contents">
              <div class="mediaobject">
                <img src="validity2.png" alt="Loading Failure Points">
              </div>
            </div>
          </div>
          <br class="figure-break">
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2767852"></a>3.3.1.&nbsp;Well-Formed Streams and Identified Aliases</h3>
                </div>
              </div>
            </div>
            <p>
          A <a id="id2767860" class="indexterm"></a><a class="link" href="#stream/well-formed/">well-formed</a> character <a id="id2767877" class="indexterm"></a><a class="link" href="#stream//">stream</a> must match the BNF productions
          specified in the following chapters. Successful loading also requires
          that each <a id="id2767891" class="indexterm"></a><a class="link" href="#alias//">alias</a> shall refer to a
          previous <a id="id2767904" class="indexterm"></a><a class="link" href="#node//">node</a> <a id="id2767917" class="indexterm"></a><a class="link" href="#alias/identified/">identified</a> by the
          <a id="id2767932" class="indexterm"></a><a class="link" href="#anchor//">anchor</a>. A YAML <a id="id2767945" class="indexterm"></a><a class="link" href="#processor//">processor</a> should reject <a id="id2767958" class="indexterm"></a><a id="stream/ill-formed/"></a><em class="firstterm">ill-formed streams</em>
          and <a id="id2767974" class="indexterm"></a><a id="alias/unidentified/"></a><em class="firstterm">unidentified
          aliases</em>. A YAML <a id="id2767992" class="indexterm"></a><a class="link" href="#processor//">processor</a> may recover from syntax
          errors, possibly by ignoring certain parts of the input, but it must
          provide a mechanism for reporting such errors.
        </p>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2768011"></a>3.3.2.&nbsp;Resolved Tags</h3>
                </div>
              </div>
            </div>
            <p>
          Typically, most <a id="id2768019" class="indexterm"></a><a class="link" href="#tag//">tags</a> are not
          explicitly specified in the character <a id="id2768032" class="indexterm"></a><a class="link" href="#stream//">stream</a>. During <a id="id2768045" class="indexterm"></a><a class="link" href="#parse//">parsing</a>, <a id="id2768057" class="indexterm"></a><a class="link" href="#node//">nodes</a> lacking an explicit <a id="id2768070" class="indexterm"></a><a class="link" href="#tag//">tag</a> are given a <a id="id2768083" class="indexterm"></a><a id="tag/non-specific/"></a><em class="firstterm">non-specific tag</em>: <a id="id2768099" class="indexterm"></a><a id="! tag indicator/! non-specific tag/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</em> for non-<a id="id2768122" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a>, and
          <a id="id2768140" class="indexterm"></a><a id="? non-specific tag//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”</em>
          for all other <a id="id2768160" class="indexterm"></a><a class="link" href="#node//">nodes</a>. <a id="id2768172" class="indexterm"></a><a class="link" href="#compose//">Composing</a> a <a id="id2768184" class="indexterm"></a><a class="link" href="#representation/complete/">complete
          representation</a> requires each such non-specific tag to be
          <a id="id2768202" class="indexterm"></a><a id="tag/resolution/"></a><em class="firstterm">resolved</em> to a
          <a id="id2768218" class="indexterm"></a><a id="tag/specific/"></a><em class="firstterm">specific tag</em>,
          be it a <a id="id2768235" class="indexterm"></a><a class="link" href="#tag/global/">global
          tag</a> or a <a id="id2768250" class="indexterm"></a><a class="link" href="#tag/local/">local
          tag</a>.
        </p>
            <p>
          Resolving the <a id="id2768268" class="indexterm"></a><a class="link" href="#tag//">tag</a> of a <a id="id2768280" class="indexterm"></a><a class="link" href="#node//">node</a> must only depend on the following three
          parameters: (1) the non-specific tag of the <a id="id2768295" class="indexterm"></a><a class="link" href="#node//">node</a>, (2) the path leading from the <a id="id2768308" class="indexterm"></a><a class="link" href="#node/root/">root</a> to the <a id="id2768324" class="indexterm"></a><a class="link" href="#node//">node</a>, and (3) the <a id="id2768337" class="indexterm"></a><a class="link" href="#content//">content</a> (and hence the <a id="id2768349" class="indexterm"></a><a class="link" href="#kind//">kind</a>) of the <a id="id2768362" class="indexterm"></a><a class="link" href="#node//">node</a>. When a <a id="id2768375" class="indexterm"></a><a class="link" href="#node//">node</a> has more than one occurrence (using
          <a id="id2768388" class="indexterm"></a><a class="link" href="#alias//">aliases</a>), tag resolution must
          depend only on the path to the first (<a id="id2768402" class="indexterm"></a><a class="link" href="#anchor//">anchored</a>) occurrence of the <a id="id2768415" class="indexterm"></a><a class="link" href="#node//">node</a>.
        </p>
            <p>
          Note that resolution must not consider <a id="id2768432" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
          details</a> such as <a id="id2768448" class="indexterm"></a><a class="link" href="#comment//">comments</a>, <a id="id2768461" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> and <a id="id2768476" class="indexterm"></a><a class="link" href="#style//">node style</a>. Also, resolution must not
          consider the <a id="id2768489" class="indexterm"></a><a class="link" href="#content//">content</a> of any
          other <a id="id2768502" class="indexterm"></a><a class="link" href="#node//">node</a>, except for the <a id="id2768514" class="indexterm"></a><a class="link" href="#content//">content</a> of the <a id="id2768527" class="indexterm"></a><a class="link" href="#key//">key
          nodes</a> directly along the path leading from the <a id="id2768540" class="indexterm"></a><a class="link" href="#node/root/">root</a> to the resolved
          <a id="id2768556" class="indexterm"></a><a class="link" href="#node//">node</a>. Finally, resolution must not
          consider the <a id="id2768569" class="indexterm"></a><a class="link" href="#content//">content</a> of a
          sibling <a id="id2768582" class="indexterm"></a><a class="link" href="#node//">node</a> in a <a id="id2768595" class="indexterm"></a><a class="link" href="#collection//">collection</a>, or the <a id="id2768608" class="indexterm"></a><a class="link" href="#content//">content</a> of the <a id="id2768620" class="indexterm"></a><a class="link" href="#value//">value node</a> associated with a <a id="id2768633" class="indexterm"></a><a class="link" href="#key//">key node</a> being resolved.
        </p>
            <p>
          These rules ensure that tag resolution can be performed as soon as a
          <a id="id2768650" class="indexterm"></a><a class="link" href="#node//">node</a> is first encountered in the
          <a id="id2768664" class="indexterm"></a><a class="link" href="#stream//">stream</a>, typically before its
          <a id="id2768677" class="indexterm"></a><a class="link" href="#content//">content</a> is <a id="id2768689" class="indexterm"></a><a class="link" href="#parse//">parsed</a>. Also, tag resolution only requires
          referring to a relatively small number of previously parsed <a id="id2768704" class="indexterm"></a><a class="link" href="#node//">nodes</a>. Thus, in most cases, tag resolution
          in one-pass <a id="id2768717" class="indexterm"></a><a class="link" href="#processor//">processors</a> is both
          possible and practical.
        </p>
            <p>
          YAML <a id="id2768734" class="indexterm"></a><a class="link" href="#processor//">processors</a> should resolve
          <a id="id2768747" class="indexterm"></a><a class="link" href="#node//">nodes</a> having the “<span class="quote"><strong class="userinput"><code>!</code></strong></span>”
          non-specific tag as “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>”,
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>” or
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:str</code></strong></span>” depending on their <a id="id2768790" class="indexterm"></a><a class="link" href="#kind//">kind</a>. This <a id="id2768802" class="indexterm"></a><a id="tag/resolution/convention"></a><em class="firstterm">tag resolution
          convention</em> allows the author of a YAML character <a id="id2768823" class="indexterm"></a><a class="link" href="#stream//">stream</a> to effectively
          “<span class="quote">disable</span>” the tag resolution process. By explicitly
          specifying a “<span class="quote"><strong class="userinput"><code>!</code></strong></span>” non-specific <a id="id2768847" class="indexterm"></a><a class="link" href="#tag/property/">tag property</a>, the <a id="id2768863" class="indexterm"></a><a class="link" href="#node//">node</a> would then be resolved to a
          “<span class="quote">vanilla</span>” <a id="id2768880" class="indexterm"></a><a class="link" href="#sequence//">sequence</a>, <a id="id2768892" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>, or string, according to its
          <a id="id2768905" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
        </p>
            <p>
          <a id="id2768921" class="indexterm"></a><a class="link" href="#application//">Application</a> specific tag
          resolution rules should be restricted to resolving the
          “<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific tag, most commonly to resolving
          <a id="id2768943" class="indexterm"></a><a class="link" href="#style/flow/plain">plain
          scalars</a>. These may be matched against a set of regular
          expressions to provide automatic resolution of integers, floats,
          timestamps, and similar types. An <a id="id2768964" class="indexterm"></a><a class="link" href="#application//">application</a> may also match the
          <a id="id2768977" class="indexterm"></a><a class="link" href="#content//">content</a> of <a id="id2768990" class="indexterm"></a><a class="link" href="#mapping//">mapping nodes</a> against sets of expected
          <a id="id2769003" class="indexterm"></a><a class="link" href="#key//">keys</a> to automatically resolve
          points, complex numbers, and similar types. Resolved <a id="id2769017" class="indexterm"></a><a class="link" href="#sequence//">sequence node</a> types such as the
          “<span class="quote">ordered mapping</span>” are also possible.
        </p>
            <p>
          That said, tag resolution is specific to the <a id="id2769039" class="indexterm"></a><a class="link" href="#application//">application</a>. YAML <a id="id2769052" class="indexterm"></a><a class="link" href="#processor//">processors</a> should therefore provide a
          mechanism allowing the <a id="id2769065" class="indexterm"></a><a class="link" href="#application//">application</a> to override and expand
          these default tag resolution rules.
        </p>
            <p>
          If a <a id="id2769083" class="indexterm"></a><a class="link" href="#document//">document</a> contains <a id="id2769095" class="indexterm"></a><a id="tag/unresolved/"></a><em class="firstterm">unresolved tags</em>, the
          YAML <a id="id2769112" class="indexterm"></a><a class="link" href="#processor//">processor</a> is unable to
          <a id="id2769125" class="indexterm"></a><a class="link" href="#compose//">compose</a> a <a id="id2769137" class="indexterm"></a><a class="link" href="#representation/complete/">complete
          representation</a> graph. In such a case, the YAML <a id="id2769154" class="indexterm"></a><a class="link" href="#processor//">processor</a> may <a id="id2769167" class="indexterm"></a><a class="link" href="#compose//">compose</a> a <a id="id2769179" class="indexterm"></a><a class="link" href="#representation/partial/">partial
          representation</a>, based on each <a id="id2769197" class="indexterm"></a><a class="link" href="#kind//">node’s kind</a> and allowing for non-specific
          tags.
        </p>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2769212"></a>3.3.3.&nbsp;Recognized and Valid Tags</h3>
                </div>
              </div>
            </div>
            <p>
          To be <a id="id2769221" class="indexterm"></a><a id="content/valid/"></a><em class="firstterm">valid</em>, a
          <a id="id2769237" class="indexterm"></a><a class="link" href="#node//">node</a> must have a <a id="id2769250" class="indexterm"></a><a class="link" href="#tag//">tag</a> which is <a id="id2769262" class="indexterm"></a><a id="tag/recognized/"></a><em class="firstterm">recognized</em> by the YAML <a id="id2769279" class="indexterm"></a><a class="link" href="#processor//">processor</a> and its <a id="id2769291" class="indexterm"></a><a class="link" href="#content//">content</a> must satisfy the constraints
          imposed by this <a id="id2769305" class="indexterm"></a><a class="link" href="#tag//">tag</a>. If a <a id="id2769317" class="indexterm"></a><a class="link" href="#document//">document</a> contains a <a id="id2769330" class="indexterm"></a><a class="link" href="#scalar//">scalar node</a> with an <a id="id2769342" class="indexterm"></a><a id="tag/unrecognized/"></a><em class="firstterm">unrecognized tag</em> or <a id="id2769359" class="indexterm"></a><a id="invalid content//"></a><em class="firstterm">invalid content</em>, only a <a id="id2769373" class="indexterm"></a><a class="link" href="#representation/partial/">partial
          representation</a> may be <a id="id2769390" class="indexterm"></a><a class="link" href="#compose//">composed</a>. In contrast, a YAML <a id="id2769402" class="indexterm"></a><a class="link" href="#processor//">processor</a> can always <a id="id2769415" class="indexterm"></a><a class="link" href="#compose//">compose</a> a <a id="id2769428" class="indexterm"></a><a class="link" href="#representation/complete/">complete
          representation</a> for an unrecognized or an invalid <a id="id2769445" class="indexterm"></a><a class="link" href="#collection//">collection</a>, since <a id="id2769458" class="indexterm"></a><a class="link" href="#collection//">collection</a> <a id="id2769471" class="indexterm"></a><a class="link" href="#equality//">equality</a> does not depend upon knowledge
          of the <a id="id2769484" class="indexterm"></a><a class="link" href="#collection//">collection’s</a> data
          type. However, such a <a id="id2769498" class="indexterm"></a><a class="link" href="#representation/complete/">complete representation</a> cannot be
          used to <a id="id2769513" class="indexterm"></a><a class="link" href="#construct//">construct</a> a <a id="id2769526" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structure</a>.
        </p>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2769542"></a>3.3.4.&nbsp;Available Tags</h3>
                </div>
              </div>
            </div>
            <p>
          In a given processing environment, there need not be an <a id="id2769551" class="indexterm"></a><a id="tag/available/"></a><em class="firstterm">available</em> native type
          corresponding to a given <a id="id2769569" class="indexterm"></a><a class="link" href="#tag//">tag</a>. If a
          <a id="id2769581" class="indexterm"></a><a class="link" href="#tag//">node’s tag</a> is <a id="id2769593" class="indexterm"></a><a id="tag/unavailable/"></a><em class="firstterm">unavailable</em>, a YAML
          <a id="id2769609" class="indexterm"></a><a class="link" href="#processor//">processor</a> will not be able to
          <a id="id2769622" class="indexterm"></a><a class="link" href="#construct//">construct</a> a <a id="id2769635" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structure</a> for
          it. In this case, a <a id="id2769649" class="indexterm"></a><a class="link" href="#representation/complete/">complete representation</a> may still be
          <a id="id2769665" class="indexterm"></a><a class="link" href="#compose//">composed</a>, and an <a id="id2769678" class="indexterm"></a><a class="link" href="#application//">application</a> may wish to use this
          <a id="id2769692" class="indexterm"></a><a class="link" href="#representation//">representation</a> directly.
        </p>
          </div>
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Syntax"></a>Chapter&nbsp;4.&nbsp;Syntax Conventions</h2>
            </div>
          </div>
        </div>
        <p>
      The following chapters formally define the syntax of YAML character
      <a id="id2769721" class="indexterm"></a><a class="link" href="#stream//">streams</a>, using parameterized BNF
      productions. Each BNF production is both named and numbered for easy
      reference. Whenever possible, basic structures are specified before the
      more complex structures using them in a “<span class="quote">bottom up</span>” fashion.
    </p>
        <p>
      The order of alternatives inside a production is significant. Subsequent
      alternatives are only considered when previous ones fails. See for
      example the <a href="#b-break"><strong class="userinput"><code>b-break</code></strong></a> production.
      In addition, production matching is expected to be greedy. Optional
      (<strong class="userinput"><code>?</code></strong>), zero-or-more (<strong class="userinput"><code>*</code></strong>) and
      one-or-more (<strong class="userinput"><code>+</code></strong>) patterns are always expected to
      match as much of the input as possible.
    </p>
        <p>
      The productions are accompanied by examples, which are given side-by-side
      next to equivalent YAML text in an explanatory format. This format uses
      only <a id="id2769784" class="indexterm"></a><a class="link" href="#style/flow/collection">flow
      collections</a>, <a id="id2769803" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted scalars</a>, and explicit
      <a id="id2769822" class="indexterm"></a><a class="link" href="#tag//">tags</a> for each <a id="id2769834" class="indexterm"></a><a class="link" href="#node//">node</a>.
    </p>
        <p>
      A reference implementation using the productions is available as the
      <a class="ulink" href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/YamlReference" target="_top">YamlReference</a> Haskell package. This reference implementation is
      also available as an interactive web application at <a class="ulink" href="http://dev.yaml.org/ypaste" target="_top">http://dev.yaml.org/ypaste</a>.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2769866"></a>4.1.&nbsp;Production Parameters</h2>
              </div>
            </div>
          </div>
          <p>
        YAML’s syntax is designed for maximal human readability. This
        requires <a id="id2769878" class="indexterm"></a><a class="link" href="#parse//">parsing</a> to depend on the
        surrounding text. For notational compactness, this dependency is
        expressed using parameterized BNF productions.
      </p>
          <p>
        This context sensitivity is the cause of most of the complexity of the
        YAML syntax definition. It is further complicated by struggling with
        the human tendency to look ahead when interpreting text. These
        complications are of course the source of most of YAML’s power to
        <a id="id2769906" class="indexterm"></a><a class="link" href="#presentation//">present</a> data in a very human
        readable way.
      </p>
          <p>
        Productions use any of the following parameters:
      </p>
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">
            Indentation: <code class="varname">n</code> or <code class="varname">m</code>
          </span>
              </dt>
              <dd>
            Many productions use an explicit <a id="id2769946" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> level parameter. This
            is less elegant than Python’s “<span class="quote">indent</span>” and
            “<span class="quote">undent</span>” conceptual tokens. However it is required to
            formally express YAML’s indentation rules.
          </dd>
            </dl>
          </div>
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">Context: <code class="varname">c</code></span>
              </dt>
              <dd>
                <p>
              This parameter allows productions to tweak their behavior
              according to their surrounding. YAML supports two groups of
              <a id="id2769997" class="indexterm"></a><a id="context//"></a><em class="firstterm">contexts</em>, distinguishing
              between <a id="id2770012" class="indexterm"></a><a class="link" href="#style/block/">block
              styles</a> and <a id="id2770028" class="indexterm"></a><a class="link" href="#style/flow/">flow styles</a>.
            </p>
                <p>
              In <a id="id2770046" class="indexterm"></a><a class="link" href="#style/block/">block
              styles</a>, <a id="id2770062" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> is used to
              delineate structure. To capture human perception of <a id="id2770079" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> the
              rules require special treatment of the <a id="id2770095" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>”</a> character, used in
              <a id="id2770114" class="indexterm"></a><a class="link" href="#style/block/sequence">block sequences</a>. Hence in some
              cases productions need to behave differently inside <a id="id2770133" class="indexterm"></a><a class="link" href="#style/block/sequence">block
              sequences</a> (<a id="id2770151" class="indexterm"></a><a id="context/block-in/"></a><em class="firstterm">block-in context</em>) and outside them
              (<a id="id2770168" class="indexterm"></a><a id="context/block-out/"></a><em class="firstterm">block-out
              context</em>).
            </p>
                <p>
              In <a id="id2770188" class="indexterm"></a><a class="link" href="#style/flow/">flow
              styles</a>, explicit <a id="id2770204" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> are used to delineate
              structure. These styles can be viewed as the natural extension of
              JSON to cover <a id="id2770218" class="indexterm"></a><a class="link" href="#tag//">tagged</a>, <a id="id2770230" class="indexterm"></a><a class="link" href="#style/flow/single-quoted">single-quoted</a> and <a id="id2770249" class="indexterm"></a><a class="link" href="#style/flow/plain">plain
              scalars</a>. Since the latter have no delineating <a id="id2770268" class="indexterm"></a><a class="link" href="#indicator//">indicators</a>, they are subject to
              some restrictions to avoid ambiguities. These restrictions depend
              on where they appear: as implicit keys directly inside a <a id="id2770283" class="indexterm"></a><a class="link" href="#style/block/mapping">block
              mapping</a> (<a id="id2770301" class="indexterm"></a><a id="context/block-key/"></a><em class="firstterm">block-key</em>); as implicit keys
              inside a <a id="id2770318" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow mapping</a> (<a id="id2770335" class="indexterm"></a><a id="context/flow-key/"></a><em class="firstterm">flow-key</em>); as
              values inside a <a id="id2770353" class="indexterm"></a><a class="link" href="#style/flow/collection">flow collection</a> (<a id="id2770371" class="indexterm"></a><a id="context/flow-in/"></a><em class="firstterm">flow-in</em>); or as
              values outside one (<a id="id2770388" class="indexterm"></a><a id="context/flow-out/"></a><em class="firstterm">flow-out</em>).
            </p>
              </dd>
              <dt>
                <span class="term">(Block) Chomping: <code class="varname">t</code></span>
              </dt>
              <dd>
            Block scalars offer three possible mechanisms for <a id="id2770420" class="indexterm"></a><a class="link" href="#chomping//">chomping</a> any trailing <a id="id2770434" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a>: <a id="id2770447" class="indexterm"></a><a class="link" href="#chomping/strip/">strip</a>, <a id="id2770463" class="indexterm"></a><a class="link" href="#chomping/clip/">clip</a> and <a id="id2770479" class="indexterm"></a><a class="link" href="#chomping/keep/">keep</a>. Unlike the
            previous parameters, this only controls interpretation; the
            <a id="id2770497" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> are valid in
            all cases.
          </dd>
            </dl>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2770517"></a>4.2.&nbsp;Production Naming Conventions</h2>
              </div>
            </div>
          </div>
          <p>
        To make it easier to follow production combinations, production names
        use a Hungarian-style naming convention. Each production is given a
        prefix based on the type of characters it begins and ends with.
      </p>
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>e-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production matching no characters.
          </dd>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>c-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production starting and ending with a special character.
          </dd>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>b-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production matching a single <a id="id2770573" class="indexterm"></a><a class="link" href="#line%20break//">line
            break</a>.
          </dd>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>nb-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production starting and ending with a non-<a id="id2770600" class="indexterm"></a><a class="link" href="#line%20break//">break</a> character.
          </dd>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>s-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production starting and ending with a <a id="id2770628" class="indexterm"></a><a class="link" href="#space/white/">white space</a> character.
          </dd>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>ns-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production starting and ending with a non-<a id="id2770659" class="indexterm"></a><a class="link" href="#space/white/">space</a> character.
          </dd>
              <dt>
                <span class="term">
                  <strong class="userinput">
                    <code>l-</code>
                  </strong>
                </span>
              </dt>
              <dd>
            A production matching complete line(s).
          </dd>
              <dt>
                <span class="term">
            <code class="varname">X</code><strong class="userinput"><code>-</code></strong><code class="varname">Y</code><strong class="userinput"><code>-</code></strong>
          </span>
              </dt>
              <dd>
            A production starting with an
            <code class="varname">X</code><strong class="userinput"><code>-</code></strong> character and ending
            with a <code class="varname">Y</code><strong class="userinput"><code>-</code></strong> character,
            where <code class="varname">X</code><strong class="userinput"><code>-</code></strong> and
            <code class="varname">Y</code><strong class="userinput"><code>-</code></strong> are any of the above
            prefixes.
          </dd>
              <dt>
                <span class="term">
            <code class="varname">X</code><strong class="userinput"><code>+</code></strong>,
            <code class="varname">X</code><strong class="userinput"><code>-</code></strong><code class="varname">Y</code><strong class="userinput"><code>+</code></strong>
          </span>
              </dt>
              <dd>
            A production as above, with the additional property that the
            matched content <a id="id2770780" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> level is greater than
            the specified <code class="varname">n</code> parameter.
          </dd>
            </dl>
          </div>
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Characters"></a>Chapter&nbsp;5.&nbsp;Characters</h2>
            </div>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2770814"></a>5.1.&nbsp;Character Set</h2>
              </div>
            </div>
          </div>
          <p>
        To ensure readability, YAML <a id="id2770823" class="indexterm"></a><a class="link" href="#stream//">streams</a>
        use only the <a id="id2770836" class="indexterm"></a><a id="printable character//"></a><em class="firstterm">printable</em>
        subset of the Unicode character set. The allowed character range
        explicitly excludes the C0 control block
        <strong class="userinput"><code>#x0-#x1F</code></strong> (except for TAB
        <strong class="userinput"><code>#x9</code></strong>, LF <strong class="userinput"><code>#xA</code></strong>, and CR
        <strong class="userinput"><code>#xD</code></strong> which are allowed), DEL
        <strong class="userinput"><code>#x7F</code></strong>, the C1 control block
        <strong class="userinput"><code>#x80-#x9F</code></strong> (except for NEL
        <strong class="userinput"><code>#x85</code></strong> which is allowed), the surrogate block
        <strong class="userinput"><code>#xD800-#xDFFF</code></strong>, <strong class="userinput"><code>#xFFFE</code></strong>,
        and <strong class="userinput"><code>#xFFFF</code></strong>.
      </p>
          <p>
        On input, a YAML <a id="id2770917" class="indexterm"></a><a class="link" href="#processor//">processor</a> must
        accept all Unicode characters except those explicitly excluded above.
      </p>
          <p>
        On output, a YAML <a id="id2770935" class="indexterm"></a><a class="link" href="#processor//">processor</a> must
        only produce acceptable characters. Any excluded characters must be
        <a id="id2770949" class="indexterm"></a><a class="link" href="#present//">presented</a> using <a id="id2770961" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape</a> sequences. In addition, any allowed
        characters known to be non-printable should also be <a id="id2770980" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escaped</a>. This isn’t mandatory since a full
        implementation would require extensive character property tables.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[1]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-printable"></a>c-printable</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;#x9 | #xA | #xD | [#x20-#x7E]&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* 8 bit */<br>
            | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] /* 16 bit */<br>
            | [#x10000-#x10FFFF]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;/* 32 bit */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        To ensure <a id="id2771033" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON
        compatibility</a>, YAML <a id="id2771048" class="indexterm"></a><a class="link" href="#processor//">processors</a> must allow all non-control
        characters inside <a id="id2771061" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">quoted scalars</a>. To ensure
        readability, non-printable characters should be <a id="id2771081" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escaped</a> on output, even inside such <a id="id2771098" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">scalars</a>. Note that JSON <a id="id2771116" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">quoted
        scalars</a> cannot span multiple lines or contain <a id="id2771134" class="indexterm"></a><a class="link" href="#tab//">tabs</a>, but YAML <a id="id2771146" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">quoted scalars</a> can.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[2]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="nb-json"></a>nb-json</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            #x9 | [#x20-#x10FFFF]
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2771184"></a>5.2.&nbsp;Character Encodings</h2>
              </div>
            </div>
          </div>
          <p>
        All characters mentioned in this specification are Unicode code points.
        Each such code point is written as one or more bytes depending on the
        <a id="id2771194" class="indexterm"></a><a id="character encoding//"></a><em class="firstterm">character encoding</em>
        used. Note that in UTF-16, characters above
        <strong class="userinput"><code>#xFFFF</code></strong> are written as four bytes, using a
        surrogate pair.
      </p>
          <p>
        The character encoding is a <a id="id2771221" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be used
        to convey <a id="id2771238" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <p>
        On input, a YAML <a id="id2771254" class="indexterm"></a><a class="link" href="#processor//">processor</a> must
        support the UTF-8 and UTF-16 character encodings. For <a id="id2771267" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON compatibility</a>, the UTF-32
        encodings must also be supported.
      </p>
          <p>
        If a character <a id="id2771286" class="indexterm"></a><a class="link" href="#stream//">stream</a> begins with a
        <a id="id2771298" class="indexterm"></a><a id="byte order mark//"></a><em class="firstterm">byte order mark</em>, the
        character encoding will be taken to be as as indicated by the byte
        order mark. Otherwise, the <a id="id2771314" class="indexterm"></a><a class="link" href="#stream//">stream</a>
        must begin with an ASCII character. This allows the encoding to be
        deduced by the pattern of null (<strong class="userinput"><code>#x00</code></strong>)
        characters.
      </p>
          <p>
        To make it easier to concatenate <a id="id2771339" class="indexterm"></a><a class="link" href="#stream//">streams</a>, byte order marks may appear at the
        start of any <a id="id2771353" class="indexterm"></a><a class="link" href="#document//">document</a>. However
        all <a id="id2771366" class="indexterm"></a><a class="link" href="#document//">documents</a> in the same
        <a id="id2771379" class="indexterm"></a><a class="link" href="#stream//">stream</a> must use the same character
        encoding.
      </p>
          <p>
        To allow for <a id="id2771396" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON
        compatibility</a>, byte order marks are also allowed inside
        <a id="id2771410" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">quoted scalars</a>. For readability,
        such <a id="id2771429" class="indexterm"></a><a class="link" href="#content//">content</a> byte order marks
        should be <a id="id2771443" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escaped</a> on output.
      </p>
          <p>
        The encoding can therefore be deduced by matching the first few bytes
        of the <a id="id2771467" class="indexterm"></a><a class="link" href="#stream//">stream</a> with the following
        table rows (in order):
      </p>
          <div class="informaltable">
            <table style="width: 0%;" border="0">
              <colgroup>
                <col>
                <col>
                <col>
                <col>
                <col>
                <col>
              </colgroup>
              <tbody>
                <tr>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;<span class="emphasis"><b>Byte0&nbsp;</b></span></td>
                  <td width="50%">&nbsp;<span class="emphasis"><b>Byte1&nbsp;</b></span></td>
                  <td width="50%">&nbsp;<span class="emphasis"><b>Byte2&nbsp;</b></span></td>
                  <td width="50%">&nbsp;<span class="emphasis"><b>Byte3&nbsp;</b></span></td>
                  <td width="50%">&nbsp;<span class="emphasis"><b>Encoding</b></span></td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Explicit&nbsp;BOM</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFE</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFF</code></strong></td>
                  <td width="50%">&nbsp;UTF-32BE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;ASCII&nbsp;first&nbsp;character</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<span class="emphasis"><em>any</em></span></td>
                  <td width="50%">&nbsp;UTF-32BE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Explicit&nbsp;BOM</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFF</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFE</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;UTF-32LE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;ASCII&nbsp;first&nbsp;character</em></span></td>
                  <td width="50%">&nbsp;<span class="emphasis"><em>any</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;UTF-32LE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Explicit&nbsp;BOM</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFE</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFF</code></strong></td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;UTF-16BE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;ASCII&nbsp;first&nbsp;character</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;<span class="emphasis"><em>any</em></span></td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;UTF-16BE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Explicit&nbsp;BOM</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFF</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xFE</code></strong></td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;UTF-16LE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;ASCII&nbsp;first&nbsp;character</em></span></td>
                  <td width="50%">&nbsp;<span class="emphasis"><em>any</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#x00</code></strong></td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;UTF-16LE</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Explicit&nbsp;BOM</em></span></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xEF</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xBB</code></strong></td>
                  <td width="50%">&nbsp;<strong class="userinput"><code>#xBF</code></strong></td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;UTF-8</td>
                </tr>
                <tr>
                  <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Default</em></span></td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;</td>
                  <td width="50%">&nbsp;UTF-8</td>
                </tr>
              </tbody>
            </table>
          </div>
          <p>
        The recommended output encoding is UTF-8. If another encoding is used,
        it is recommended that an explicit byte order mark be used, even if the
        first <a id="id2771897" class="indexterm"></a><a class="link" href="#stream//">stream</a> character is ASCII.
      </p>
          <p>
        For more information about the byte order mark and the Unicode
        character encoding schemes see the <a class="ulink" href="http://www.unicode.org/unicode/faq/utf_bom.html" target="_top">Unicode
        FAQ</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[3]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-byte-order-mark"></a>c-byte-order-mark</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            #xFEFF
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        In the examples, byte order mark characters are displayed as
        “<span class="quote"><strong class="userinput"><code>⇔</code></strong></span>”.
      </p>
          <div class="example">
            <a id="id2771951"></a>
            <p class="title">
              <b>Example&nbsp;5.1.&nbsp;Byte Order Mark</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">⇔</code># Comment only.<br></span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-byte-order-mark">c-byte-order-mark</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database"># This stream contains no<br># documents, only comments.
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <div class="example">
            <a id="id2772017"></a>
            <p class="title">
              <b>Example&nbsp;5.2.&nbsp;Invalid Byte Order Mark</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="screen"><span class="database">- Invalid use of BOM<br><code class="filename">⇔</code>
- Inside a document.
</span></pre>
            </td>
                  <td width="50%">
<pre class="screen"><span class="database">ERROR:<br> A <code class="filename">BOM</code> must not appear
 inside a document.
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2772075"></a>5.3.&nbsp;Indicator Characters</h2>
              </div>
            </div>
          </div>
          <p>
        <a id="id2772083" class="indexterm"></a><a id="indicator//"></a><em class="firstterm">Indicators</em> are characters that
        have special semantics.
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[4]</td><td class="productionlhs" valign="top" align="right"><a id="c-sequence-entry"></a>c-sequence-entry</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">-</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772129" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>”</a> (<strong class="userinput"><code>#x2D</code></strong>,
          hyphen) denotes a <a id="id2772154" class="indexterm"></a><a class="link" href="#style/block/sequence">block sequence</a> entry.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[5]</td><td class="productionlhs" valign="top" align="right"><a id="c-mapping-key"></a>c-mapping-key</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">?</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772205" class="indexterm"></a><a class="link" href="#?%20mapping%20key//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”</a>
          (<strong class="userinput"><code>#x3F</code></strong>, question mark) denotes a <a id="id2772228" class="indexterm"></a><a class="link" href="#key//">mapping key</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[6]</td><td class="productionlhs" valign="top" align="right"><a id="c-mapping-value"></a>c-mapping-value</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">:</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772273" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:</code></strong></span>”</a>
          (<strong class="userinput"><code>#x3A</code></strong>, colon) denotes a <a id="id2772297" class="indexterm"></a><a class="link" href="#value//">mapping value</a>.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2772312"></a>
            <p class="title">
              <b>Example&nbsp;5.3.&nbsp;Block Structure Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">sequence<span class="property">:</span><br><code class="filename">-</code> one
<code class="filename">-</code> two
mapping<span class="property">:</span>
  <code class="literal">?</code> sky
  <span class="property">:</span> blue
  sea <span class="property">:</span> green
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-sequence-entry">c-sequence-entry</a></code>
  <code class="literal"><a class="link" href="#c-mapping-key">c-mapping-key</a></code> <span class="property"><a class="link" href="#c-mapping-value">c-mapping-value</a></span>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "sequence"
  : !!seq [ !!str "one", !!str "two" ],
  ? !!str "mapping"
  : !!map {
    ? !!str "sky" : !!str "blue",
    ? !!str "sea" : !!str "green",
  },
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[7]</td><td class="productionlhs" valign="top" align="right"><a id="c-collect-entry"></a>c-collect-entry</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">,</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772469" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a>
          (<strong class="userinput"><code>#x2C</code></strong>, comma) ends a <a id="id2772492" class="indexterm"></a><a class="link" href="#style/flow/collection">flow collection</a>
          entry.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[8]</td><td class="productionlhs" valign="top" align="right"><a id="c-sequence-start"></a>c-sequence-start</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">[</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772544" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</a> (<strong class="userinput"><code>#x5B</code></strong>,
          left bracket) starts a <a id="id2772568" class="indexterm"></a><a class="link" href="#style/flow/sequence">flow sequence</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[9]</td><td class="productionlhs" valign="top" align="right"><a id="c-sequence-end"></a>c-sequence-end</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">]</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772619" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</a>
          (<strong class="userinput"><code>#x5D</code></strong>, right bracket) ends a <a id="id2772642" class="indexterm"></a><a class="link" href="#style/flow/sequence">flow
          sequence</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[10]</td><td class="productionlhs" valign="top" align="right"><a id="c-mapping-start"></a>c-mapping-start</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">{</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772693" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</a> (<strong class="userinput"><code>#x7B</code></strong>,
          left brace) starts a <a id="id2772718" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow mapping</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[11]</td><td class="productionlhs" valign="top" align="right"><a id="c-mapping-end"></a>c-mapping-end</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">}</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2772769" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</a>
          (<strong class="userinput"><code>#x7D</code></strong>, right brace) ends a <a id="id2772792" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow
          mapping</a>.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2772813"></a>
            <p class="title">
              <b>Example&nbsp;5.4.&nbsp;Flow Collection Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">sequence: <code class="filename">[</code> one<span class="property">,</span> two<span class="property">,</span> <code class="filename">]</code><br>mapping: <code class="literal">{</code> sky: blue<span class="property">,</span> sea: green <code class="literal">}</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-sequence-start">c-sequence-start</a></code> <code class="filename"><a class="link" href="#c-sequence-end">c-sequence-end</a></code>
  <code class="literal"><a class="link" href="#c-mapping-start">c-mapping-start</a></code>  <code class="literal"><a class="link" href="#c-mapping-end">c-mapping-end</a></code>
  <span class="property"><a class="link" href="#c-collect-entry">c-collect-entry</a></span>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "sequence"
  : !!seq [ !!str "one", !!str "two" ],
  ? !!str "mapping"
  : !!map {
    ? !!str "sky" : !!str "blue",
    ? !!str "sea" : !!str "green",
  },
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[12]</td><td class="productionlhs" valign="top" align="right"><a id="c-comment"></a>c-comment</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">#</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          An <a id="id2772993" class="indexterm"></a><a class="link" href="##%20comment//">“<span class="quote"><strong class="userinput"><code>#</code></strong></span>”</a>
          (<strong class="userinput"><code>#x23</code></strong>, octothorpe, hash, sharp, pound, number
          sign) denotes a <a id="id2773017" class="indexterm"></a><a class="link" href="#comment//">comment</a>.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2773032"></a>
            <p class="title">
              <b>Example&nbsp;5.5.&nbsp;Comment Indicator</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">#</code> Comment only.<br></span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-comment">c-comment</a></code>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database"># This stream contains no<br># documents, only comments.
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[13]</td><td class="productionlhs" valign="top" align="right"><a id="c-anchor"></a>c-anchor</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">&amp;</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          An <a id="id2773130" class="indexterm"></a><a class="link" href="#&amp;%20anchor//">“<span class="quote"><strong class="userinput"><code>&amp;</code></strong></span>”</a>
          (<strong class="userinput"><code>#x26</code></strong>, ampersand) denotes a <a id="id2773154" class="indexterm"></a><a class="link" href="#anchor//">node’s anchor property</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[14]</td><td class="productionlhs" valign="top" align="right"><a id="c-alias"></a>c-alias</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">*</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          An <a id="id2773200" class="indexterm"></a><a class="link" href="#*%20alias//">“<span class="quote"><strong class="userinput"><code>*</code></strong></span>”</a>
          (<strong class="userinput"><code>#x2A</code></strong>, asterisk) denotes an <a id="id2773223" class="indexterm"></a><a class="link" href="#alias//">alias node</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[15]</td><td class="productionlhs" valign="top" align="right"><a id="c-tag"></a>c-tag</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">!</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          The <a id="id2773269" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator//">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a>
          (<strong class="userinput"><code>#x21</code></strong>, exclamation) is heavily overloaded for
          specifying <a id="id2773293" class="indexterm"></a><a class="link" href="#tag//">node tags</a>. It is used to
          denote <a id="id2773306" class="indexterm"></a><a class="link" href="#tag/handle/">tag
          handles</a> used in <a id="id2773321" class="indexterm"></a><a class="link" href="#directive/TAG/">tag directives</a> and <a id="id2773336" class="indexterm"></a><a class="link" href="#tag/property/">tag properties</a>; to denote <a id="id2773351" class="indexterm"></a><a class="link" href="#tag/local/">local tags</a>; and as the
          <a id="id2773366" class="indexterm"></a><a class="link" href="#tag/non-specific/">non-specific
          tag</a> for non-<a id="id2773382" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a>.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2773402"></a>
            <p class="title">
              <b>Example&nbsp;5.6.&nbsp;Node Property Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">anchored: <code class="filename">!</code>local <code class="literal">&amp;</code>anchor value<br>alias: <span class="property">*</span>anchor
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-tag">c-tag</a></code> <code class="literal"><a class="link" href="#c-anchor">c-anchor</a></code> <span class="property"><a class="link" href="#c-alias">c-alias</a></span>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "anchored"
  : !local &amp;A1 "value",
  ? !!str "alias"
  : *A1,
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[16]</td><td class="productionlhs" valign="top" align="right"><a id="c-literal"></a>c-literal</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">|</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2773534" class="indexterm"></a><a class="link" href="#%7C%20literal%20style//">“<span class="quote"><strong class="userinput"><code>|</code></strong></span>”</a>
          (<strong class="userinput"><code>7C</code></strong>, vertical bar) denotes a <a id="id2773558" class="indexterm"></a><a class="link" href="#style/block/literal">literal block
          scalar</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[17]</td><td class="productionlhs" valign="top" align="right"><a id="c-folded"></a>c-folded</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">&gt;</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2773609" class="indexterm"></a><a class="link" href="#%3E%20folded%20style//">“<span class="quote"><strong class="userinput"><code>&gt;</code></strong></span>”</a> (<strong class="userinput"><code>#x3E</code></strong>,
          greater than) denotes a <a id="id2773634" class="indexterm"></a><a class="link" href="#style/block/folded">folded block scalar</a>.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2773653"></a>
            <p class="title">
              <b>Example&nbsp;5.7.&nbsp;Block Scalar Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">literal: <code class="filename">|</code><br>  some
  text
folded: <code class="literal">&gt;</code>
  some
  text
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-literal">c-literal</a></code> <code class="literal"><a class="link" href="#c-folded">c-folded</a></code>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "literal"
  : !!str "some\ntext\n",
  ? !!str "folded"
  : !!str "some text\n",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[18]</td><td class="productionlhs" valign="top" align="right"><a id="c-single-quote"></a>c-single-quote</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">'</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          An <a id="id2773768" class="indexterm"></a><a class="link" href="#%27%20single-quoted%20style//">“<span class="quote"><strong class="userinput"><code>'</code></strong></span>”</a> (<strong class="userinput"><code>#x27</code></strong>,
          apostrophe, single quote) surrounds a <a id="id2773794" class="indexterm"></a><a class="link" href="#style/flow/single-quoted">single-quoted flow
          scalar</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[19]</td><td class="productionlhs" valign="top" align="right"><a id="c-double-quote"></a>c-double-quote</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">"</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2773845" class="indexterm"></a><a class="link" href="#%22%20double-quoted%20style//">“<span class="quote"><strong class="userinput"><code>"</code></strong></span>”</a> (<strong class="userinput"><code>#x22</code></strong>,
          double quote) surrounds a <a id="id2773870" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted flow scalar</a>.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2773890"></a>
            <p class="title">
              <b>Example&nbsp;5.8.&nbsp;Quoted Scalar Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">single: <code class="filename">'</code>text<code class="filename">'</code><br>double: <code class="literal">"</code>text<code class="literal">"</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-single-quote">c-single-quote</a></code> <code class="literal"><a class="link" href="#c-double-quote">c-double-quote</a></code>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "single"
  : !!str "text",
  ? !!str "double"
  : !!str "text",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[20]</td><td class="productionlhs" valign="top" align="right"><a id="c-directive"></a>c-directive</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">%</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          A <a id="id2774019" class="indexterm"></a><a class="link" href="#%%20directive//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a>
          (<strong class="userinput"><code>#x25</code></strong>, percent) denotes a <a id="id2774043" class="indexterm"></a><a class="link" href="#directive//">directive</a> line.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2774058"></a>
            <p class="title">
              <b>Example&nbsp;5.9.&nbsp;Directive Indicator</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">%</code>YAML 1.2<br>--- text
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-directive">c-directive</a></code>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "text"
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[21]</td><td class="productionlhs" valign="top" align="right"><a id="c-reserved"></a>c-reserved</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">@</span>” | “<span class="quote">`</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          The <a id="id2774157" class="indexterm"></a><a id="@ reserved indicator//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>@</code></strong></span>”</em> (<strong class="userinput"><code>#x40</code></strong>,
          at) and <a id="id2774183" class="indexterm"></a><a id="' reserved indicator//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>`</code></strong></span>”</em> (<strong class="userinput"><code>#x60</code></strong>,
          grave accent) are <a id="id2774209" class="indexterm"></a><a id="indicator/reserved/"></a><em class="firstterm">reserved</em> for future use.
        </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2774228"></a>
            <p class="title">
              <b>Example&nbsp;5.10.&nbsp;Invalid use of Reserved Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="screen"><span class="database">commercial-at: <code class="filename">@</code>text<br>grave-accent: <code class="filename">`</code>text
</span></pre>
            </td>
                  <td width="50%">
<pre class="screen"><span class="database">ERROR:<br> <code class="filename">Reserved indicators</code> can't
 start a plain scalar.
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        Any indicator character:
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[22]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-indicator"></a>c-indicator</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;<a href="#c-sequence-entry">“<span class="quote">-</span>”</a>
            | <a href="#c-mapping-key">“<span class="quote">?</span>”</a>
            | <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
            | <a href="#c-collect-entry">“<span class="quote">,</span>”</a>
            | <a href="#c-sequence-start">“<span class="quote">[</span>”</a>
            | <a href="#c-sequence-end">“<span class="quote">]</span>”</a>
            | <a href="#c-mapping-start">“<span class="quote">{</span>”</a>
            | <a href="#c-mapping-end">“<span class="quote">}</span>”</a><br>
            | <a href="#c-comment">“<span class="quote">#</span>”</a>
            | <a href="#c-anchor">“<span class="quote">&amp;</span>”</a>
            | <a href="#c-alias">“<span class="quote">*</span>”</a>
            | <a href="#c-tag">“<span class="quote">!</span>”</a>
            | <a href="#c-literal">“<span class="quote">|</span>”</a>
            | <a href="#c-folded">“<span class="quote">&gt;</span>”</a>
            | <a href="#c-single-quote">“<span class="quote">'</span>”</a>
            | <a href="#c-double-quote">“<span class="quote">"</span>”</a><br>
            | <a href="#c-directive">“<span class="quote">%</span>”</a>
            | <a href="#c-reserved">“<span class="quote">@</span>”
            | “<span class="quote">`</span>”</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        The <a id="id2774444" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</a>, <a id="id2774463" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</a>, <a id="id2774480" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</a>, <a id="id2774498" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</a> and <a id="id2774515" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> indicators denote structure in
        <a id="id2774534" class="indexterm"></a><a class="link" href="#style/flow/collection">flow
        collections</a>. They are therefore forbidden in some cases, to
        avoid ambiguity in several constructs. This is handled on a
        case-by-case basis by the relevant productions.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[23]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-flow-indicator"></a>c-flow-indicator</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#c-collect-entry">“<span class="quote">,</span>”</a>
            | <a href="#c-sequence-start">“<span class="quote">[</span>”</a>
            | <a href="#c-sequence-end">“<span class="quote">]</span>”</a>
            | <a href="#c-mapping-start">“<span class="quote">{</span>”</a>
            | <a href="#c-mapping-end">“<span class="quote">}</span>”</a><br>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2774608"></a>5.4.&nbsp;Line Break Characters</h2>
              </div>
            </div>
          </div>
          <p>
        YAML recognizes the following ASCII <a id="id2774617" class="indexterm"></a><a id="line break//"></a><em class="firstterm">line
        break</em> characters.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[24]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-line-feed"></a>b-line-feed</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            #xA &nbsp;&nbsp;&nbsp;/* LF */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[25]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-carriage-return"></a>b-carriage-return</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            #xD &nbsp;&nbsp;&nbsp;/* CR */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[26]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-char"></a>b-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-line-feed">b-line-feed</a>
            | <a href="#b-carriage-return">b-carriage-return</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        All other characters, including the form feed
        (<strong class="userinput"><code>#x0C</code></strong>), are considered to be non-break
        characters. Note that these include the <a id="id2774695" class="indexterm"></a><a id="line break/non-ASCII/"></a><em class="firstterm">non-ASCII line breaks</em>: next line
        (<strong class="userinput"><code>#x85</code></strong>), line separator
        (<strong class="userinput"><code>#x2028</code></strong>) and paragraph separator
        (<strong class="userinput"><code>#x2029</code></strong>).
      </p>
          <p>
        <a id="non-ASCII line breaks"></a> <a id="id2774741" class="indexterm"></a><a class="link" href="#YAML%201.1%20processing//">YAML version 1.1</a> did support the above non-ASCII
        line break characters; however, JSON does not. Hence, to ensure
        <a id="id2774758" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON compatibility</a>,
        YAML treats them as non-break characters as of version 1.2. In theory
        this would cause incompatibility with <a id="id2774773" class="indexterm"></a><a class="link" href="#YAML%201.1%20processing//">version 1.1</a>; in practice these characters were
        rarely (if ever) used. YAML 1.2 <a id="id2774788" class="indexterm"></a><a class="link" href="#processor//">processors</a> <a id="id2774800" class="indexterm"></a><a class="link" href="#parse//">parsing</a> a <a id="id2774813" class="indexterm"></a><a class="link" href="#YAML%201.1%20processing//">version 1.1</a> <a id="id2774826" class="indexterm"></a><a class="link" href="#document//">document</a> should therefore treat these line
        breaks as non-break characters, with an appropriate warning.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[27]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="nb-char"></a>nb-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#c-printable">c-printable</a>
            - <a href="#b-char">b-char</a>
            - <a href="#c-byte-order-mark">c-byte-order-mark</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        Line breaks are interpreted differently by different systems, and have
        several widely used formats.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[28]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-break"></a>b-break</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;( <a href="#b-carriage-return">b-carriage-return</a>
            <a href="#b-line-feed">b-line-feed</a> ) /* DOS, Windows */<br>
            | <a href="#b-carriage-return">b-carriage-return</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* MacOS upto 9.x */<br>
            | <a href="#b-line-feed">b-line-feed</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp; /* UNIX, MacOS X */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        Line breaks inside <a id="id2774925" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>
        must be <a id="id2774938" class="indexterm"></a><a id="line break/normalization/"></a><em class="firstterm">normalized</em> by the YAML <a id="id2774956" class="indexterm"></a><a class="link" href="#processor//">processor</a>. Each such line break must be
        <a id="id2774970" class="indexterm"></a><a class="link" href="#parse//">parsed</a> into a single line feed
        character. The original line break format is a <a id="id2774983" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a>
        and must not be used to convey <a id="id2775000" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[29]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-as-line-feed"></a>b-as-line-feed</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-break">b-break</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        Outside <a id="id2775036" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>, YAML allows
        any line break to be used to terminate lines.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[30]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-non-content"></a>b-non-content</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-break">b-break</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        On output, a YAML <a id="id2775073" class="indexterm"></a><a class="link" href="#processor//">processor</a> is
        free to emit line breaks using whatever convention is most appropriate.
      </p>
          <p>
        In the examples, line breaks are sometimes displayed using the
        “<span class="quote"><strong class="userinput"><code>↓</code></strong></span>” glyph for clarity.
      </p>
          <div class="example">
            <a id="id2775100"></a>
            <p class="title">
              <b>Example&nbsp;5.11.&nbsp;Line Break Characters</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">|<br>  Line break (no glyph)
  Line break (glyphed)<code class="filename">↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#b-break">b-break</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "line break (no glyph)\n\
      line break (glyphed)\n"
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2775170"></a>5.5.&nbsp;White Space Characters</h2>
              </div>
            </div>
          </div>
          <p>
        YAML recognizes two <a id="id2775179" class="indexterm"></a><a id="space/white/"></a><em class="firstterm">white
        space</em> characters: <a id="id2775195" class="indexterm"></a><a id="space//"></a><em class="firstterm">space</em>
        and <a id="id2775209" class="indexterm"></a><a id="tab//"></a><em class="firstterm">tab</em>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[31]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-space"></a>s-space</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            #x20 /* SP */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[32]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-tab"></a>s-tab</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            #x9 &nbsp;/* TAB */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[33]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-white"></a>s-white</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-space">s-space</a> | <a href="#s-tab">s-tab</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        The rest of the (<a id="id2775276" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a>) non-<a id="id2775290" class="indexterm"></a><a class="link" href="#line%20break//">break</a> characters are considered to be non-space
        characters.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[34]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-char"></a>ns-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#nb-char">nb-char</a> - <a href="#s-white">s-white</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        In the examples, tab characters are displayed as the glyph
        “<span class="quote"><strong class="userinput"><code>→</code></strong></span>”. Space characters are sometimes displayed as
        the glyph “<span class="quote"><strong class="userinput"><code>·</code></strong></span>” for clarity.
      </p>
          <div class="example">
            <a id="id2775350"></a>
            <p class="title">
              <b>Example&nbsp;5.12.&nbsp;Tabs and Spaces</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"># Tabs and spaces<br>quoted:<code class="filename">·</code>"Quoted <code class="literal">→</code>"
block:<code class="literal">→</code>|
<code class="filename">··</code>void main() {
<code class="filename">··</code><code class="literal">→</code>printf("Hello, world!\n");
<code class="filename">··</code>}
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-space">s-space</a></code> <code class="literal"><a class="link" href="#s-tab">s-tab</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "quoted"
  : "Quoted \t",
  ? !!str "block"
  : "void main() {\n\
    \tprintf(\"Hello, world!\\n\");\n\
    }\n",
}
</span></pre>

          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2775468"></a>5.6.&nbsp;Miscellaneous Characters</h2>
              </div>
            </div>
          </div>
          <p>
        The YAML syntax productions make use of the following additional
        character classes:
      </p>
          <div class="itemizedlist">
            <ul type="disc">
              <li>
          A decimal digit for numbers:
        </li>
            </ul>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[35]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-dec-digit"></a>ns-dec-digit</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            [#x30-#x39] /* 0-9 */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="itemizedlist">
            <ul type="disc">
              <li>
          A hexadecimal digit for <a id="id2775508" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape sequences</a>:
        </li>
            </ul>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[36]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-hex-digit"></a>ns-hex-digit</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;<a href="#ns-dec-digit">ns-dec-digit</a><br>
            | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="itemizedlist">
            <ul type="disc">
              <li>
          ASCII letter (alphabetic) characters:
        </li>
            </ul>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[37]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-ascii-letter"></a>ns-ascii-letter</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="itemizedlist">
            <ul type="disc">
              <li>
          Word (alphanumeric) characters for identifiers:
        </li>
            </ul>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[38]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-word-char"></a>ns-word-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-dec-digit">ns-dec-digit</a>
            | <a href="#ns-ascii-letter">ns-ascii-letter</a>
            | “<span class="quote">-</span>”
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="itemizedlist">
            <ul type="disc">
              <li>
                <p>
            URI characters for <a id="id2775618" class="indexterm"></a><a class="link" href="#tag//">tags</a>, as
            specified in <a class="ulink" href="http://www.ietf.org/rfc/rfc2396.txt" target="_top">RFC2396</a>, with the
            addition of the “<span class="quote"><strong class="userinput"><code>[</code></strong></span>” and “<span class="quote"><strong class="userinput"><code>]</code></strong></span>” for
            presenting IPv6 addresses as proposed in <a class="ulink" href="http://www.ietf.org/rfc/rfc2732.txt" target="_top">RFC2732</a>.
          </p>
                <p>
            By convention, any URI characters other than the allowed printable
            ASCII characters are first <a id="id2775664" class="indexterm"></a><a id="character encoding/in URI/"></a><em class="firstterm">encoded</em> in UTF-8, and then each byte
            is <a id="id2775682" class="indexterm"></a><a id="escaping/in URIs/"></a><em class="firstterm">escaped</em> using the <a id="id2775699" class="indexterm"></a><a id="% escaping in URI//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</em> character. The YAML <a id="id2775718" class="indexterm"></a><a class="link" href="#processor//">processor</a> must not expand such
            escaped characters. <a id="id2775731" class="indexterm"></a><a class="link" href="#tag//">Tag</a> characters
            must be preserved and compared exactly as <a id="id2775744" class="indexterm"></a><a class="link" href="#present//">presented</a> in the YAML <a id="id2775757" class="indexterm"></a><a class="link" href="#stream//">stream</a>, without any processing.
          </p>
              </li>
            </ul>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[39]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-uri-char"></a>ns-uri-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;“<span class="quote">%</span>” <a href="#ns-hex-digit">ns-hex-digit</a>
            <a href="#ns-hex-digit">ns-hex-digit</a>
            | <a href="#ns-word-char">ns-word-char</a> | “<span class="quote">#</span>”<br>
            | “<span class="quote">;</span>” | “<span class="quote">/</span>” | “<span class="quote">?</span>”
            | “<span class="quote">:</span>” | “<span class="quote">@</span>” | “<span class="quote">&amp;</span>”
            | “<span class="quote">=</span>” | “<span class="quote">+</span>” | “<span class="quote">$</span>”
            | “<span class="quote">,</span>”<br>
            | “<span class="quote">_</span>” | “<span class="quote">.</span>” | “<span class="quote">!</span>”
            | “<span class="quote">~</span>” | “<span class="quote">*</span>” | “<span class="quote">'</span>”
            | “<span class="quote">(</span>” | “<span class="quote">)</span>” | “<span class="quote">[</span>”
            | “<span class="quote">]</span>”
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="itemizedlist">
            <ul type="disc">
              <li>
          The <a class="link" href="#c-tag">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a> character is used
          to indicate the end of a <a id="id2775896" class="indexterm"></a><a class="link" href="#tag/handle/named">named tag handle</a>; hence its use in
          <a id="id2775916" class="indexterm"></a><a class="link" href="#tag/shorthand/">tag shorthands</a>
          is restricted. In addition, such <a id="id2775932" class="indexterm"></a><a class="link" href="#tag/shorthand/">shorthands</a> must not contain the
          <a id="id2775948" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</a>, <a id="id2775966" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</a>, <a id="id2775983" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</a>, <a id="id2776001" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</a> and <a id="id2776018" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> characters. These
          characters would cause ambiguity with <a id="id2776037" class="indexterm"></a><a class="link" href="#style/flow/collection">flow collection</a>
          structures.
        </li>
            </ul>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[40]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-tag-char"></a>ns-tag-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-uri-char">ns-uri-char</a>
            - <a href="#c-tag">“<span class="quote">!</span>”</a>
            - <a href="#c-flow-indicator">c-flow-indicator</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2776092"></a>5.7.&nbsp;Escaped Characters</h2>
              </div>
            </div>
          </div>
          <p>
        All non-<a id="id2776101" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a>
        characters must be <a id="id2776114" class="indexterm"></a><a id="escaping/in double-quoted scalars/"></a><em class="firstterm">escaped</em>. YAML escape sequences use the
        <a id="id2776133" class="indexterm"></a><a id="\ escaping in double-quoted scalars//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>\</code></strong></span>”</em> notation common to most modern
        computer languages. Each escape sequence must be <a id="id2776155" class="indexterm"></a><a class="link" href="#parse//">parsed</a> into the appropriate Unicode
        character. The original escape sequence is a <a id="id2776168" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a>
        and must not be used to convey <a id="id2776184" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <p>
        Note that escape sequences are only interpreted in <a id="id2776201" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted
        scalars</a>. In all other <a id="id2776220" class="indexterm"></a><a class="link" href="#style/scalar/">scalar styles</a>, the “<span class="quote"><strong class="userinput"><code>\</code></strong></span>”
        character has no special meaning and non-<a id="id2776243" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a> characters are not available.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[41]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-escape"></a>c-escape</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            “<span class="quote">\</span>”
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        YAML escape sequences are a superset of C’s escape sequences:
      </p>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[42]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-null"></a>ns-esc-null</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">0</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII null (<strong class="userinput"><code>#x0</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[43]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-bell"></a>ns-esc-bell</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">a</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII bell (<strong class="userinput"><code>#x7</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[44]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-backspace"></a>ns-esc-backspace</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">b</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII backspace (<strong class="userinput"><code>#x8</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[45]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-horizontal-tab"></a>ns-esc-horizontal-tab</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">t</span>”
                | #x9
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII horizontal tab (<strong class="userinput"><code>#x9</code></strong>) character.
          This is useful at the start or the end of a line to force a leading
          or trailing tab to become part of the <a id="id2776440" class="indexterm"></a><a class="link" href="#content//">content</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[46]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-line-feed"></a>ns-esc-line-feed</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">n</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII line feed (<strong class="userinput"><code>#xA</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[47]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-vertical-tab"></a>ns-esc-vertical-tab</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">v</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII vertical tab (<strong class="userinput"><code>#xB</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[48]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-form-feed"></a>ns-esc-form-feed</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">f</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII form feed (<strong class="userinput"><code>#xC</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[49]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-carriage-return"></a>ns-esc-carriage-return</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">r</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII carriage return (<strong class="userinput"><code>#xD</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[50]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-escape"></a>ns-esc-escape</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">e</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII escape (<strong class="userinput"><code>#x1B</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[51]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-space"></a>ns-esc-space</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                #x20
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII space (<strong class="userinput"><code>#x20</code></strong>) character. This is
          useful at the start or the end of a line to force a leading or
          trailing space to become part of the <a id="id2776690" class="indexterm"></a><a class="link" href="#content//">content</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[52]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-double-quote"></a>ns-esc-double-quote</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                <a href="#c-double-quote">“<span class="quote">"</span>”</a>
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII double quote (<strong class="userinput"><code>#x22</code></strong>).
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[53]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-slash"></a>ns-esc-slash</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">/</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII slash (<strong class="userinput"><code>#x2F</code></strong>),
          for <a id="id2776785" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON
          compatibility</a>.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[54]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-backslash"></a>ns-esc-backslash</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                <a href="#c-escape">“<span class="quote">\</span>”</a>
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped ASCII back slash (<strong class="userinput"><code>#x5C</code></strong>).
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[55]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-next-line"></a>ns-esc-next-line</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">N</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped Unicode next line (<strong class="userinput"><code>#x85</code></strong>) character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[56]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-non-breaking-space"></a>ns-esc-non-breaking-space</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">_</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped Unicode non-breaking space (<strong class="userinput"><code>#xA0</code></strong>)
          character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[57]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-line-separator"></a>ns-esc-line-separator</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">L</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped Unicode line separator (<strong class="userinput"><code>#x2028</code></strong>)
          character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[58]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-paragraph-separator"></a>ns-esc-paragraph-separator</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">P</span>”
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped Unicode paragraph separator (<strong class="userinput"><code>#x2029</code></strong>)
          character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[59]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-8-bit"></a>ns-esc-8-bit</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">x</span>”<br>
                ( <a href="#ns-hex-digit">ns-hex-digit</a> × 2 )
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped 8-bit Unicode character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[60]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-16-bit"></a>ns-esc-16-bit</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">u</span>”<br>
                ( <a href="#ns-hex-digit">ns-hex-digit</a> × 4 )
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped 16-bit Unicode character.
        </td>
            </tr>
          </tbody></table>
          <table class="simplelist" summary="Simple list" border="0">
            <tbody><tr>
              <td width="50%">
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5"><tbody><tr><td><table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0"><tbody><tr><td class="productioncounter" valign="top" align="left">[61]</td><td class="productionlhs" valign="top" align="right"><a id="ns-esc-32-bit"></a>ns-esc-32-bit</td><td class="productionseperator" valign="top" align="center"><code>::=</code></td><td class="productionrhs" valign="top">
                “<span class="quote">U</span>”<br>
                ( <a href="#ns-hex-digit">ns-hex-digit</a> × 8 )
              </td><td class="productioncomment" valign="top" align="left">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>
        </td>
              <td width="50%">
          Escaped 32-bit Unicode character.
        </td>
            </tr>
          </tbody></table>
          <p>
        Any escaped character:
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[62]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-ns-esc-char"></a>c-ns-esc-char</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#c-escape">“<span class="quote">\</span>”</a><br>
            (&nbsp;<a href="#ns-esc-null">ns-esc-null</a>
            | <a href="#ns-esc-bell">ns-esc-bell</a>
            | <a href="#ns-esc-backspace">ns-esc-backspace</a><br>
            | <a href="#ns-esc-horizontal-tab">ns-esc-horizontal-tab</a>
            | <a href="#ns-esc-line-feed">ns-esc-line-feed</a><br>
            | <a href="#ns-esc-vertical-tab">ns-esc-vertical-tab</a>
            | <a href="#ns-esc-form-feed">ns-esc-form-feed</a><br>
            | <a href="#ns-esc-carriage-return">ns-esc-carriage-return</a>
            | <a href="#ns-esc-escape">ns-esc-escape</a>
            | <a href="#ns-esc-space">ns-esc-space</a><br>
            | <a href="#ns-esc-double-quote">ns-esc-double-quote</a>
            | <a href="#ns-esc-slash">ns-esc-slash</a>
            | <a href="#ns-esc-backslash">ns-esc-backslash</a><br>
            | <a href="#ns-esc-next-line">ns-esc-next-line</a>
            | <a href="#ns-esc-non-breaking-space">ns-esc-non-breaking-space</a><br>
            | <a href="#ns-esc-line-separator">ns-esc-line-separator</a>
            | <a href="#ns-esc-paragraph-separator">ns-esc-paragraph-separator</a><br>
            | <a href="#ns-esc-8-bit">ns-esc-8-bit</a>
            | <a href="#ns-esc-16-bit">ns-esc-16-bit</a>
            | <a href="#ns-esc-32-bit">ns-esc-32-bit</a> )<br>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2777266"></a>
            <p class="title">
              <b>Example&nbsp;5.13.&nbsp;Escaped Characters</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">"Fun with <code class="filename">\\</code><br><code class="filename">\"</code> <code class="filename">\a</code> <code class="filename">\b</code> <code class="filename">\e</code> <code class="filename">\f</code> <code class="filename">\↓</code>
<code class="filename">\n</code> <code class="filename">\r</code> <code class="filename">\t</code> <code class="filename">\v</code> <code class="filename">\0</code> <code class="filename">\↓</code>
<code class="filename">\&nbsp;</code> <code class="filename">\_</code> <code class="filename">\N</code> <code class="filename">\L</code> <code class="filename">\P</code> <code class="filename">\↓</code>
<code class="filename">\x41</code> <code class="filename">\u0041</code> <code class="filename">\U00000041</code>"
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-ns-esc-char">c-ns-esc-char</a></code>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
"Fun with \x5C
\x22 \x07 \x08 \x1B \x0C
\x0A \x0D \x09 \x0B \x00
\x20 \xA0 \x85 \u2028 \u2029
A A A"
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <div class="example">
            <a id="id2777449"></a>
            <p class="title">
              <b>Example&nbsp;5.14.&nbsp;Invalid Escaped Characters</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="screen"><span class="database">Bad escapes:<br>  "\<code class="filename">c</code>
  \x<code class="literal">q-</code>"
</span></pre>
            </td>
                  <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>- <code class="filename">c</code> is an invalid escaped character.
- <code class="literal">q</code> and <code class="literal">-</code> are invalid hex digits.
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Basic"></a>Chapter&nbsp;6.&nbsp;Basic Structures</h2>
            </div>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2777534"></a>6.1.&nbsp;Indentation Spaces</h2>
              </div>
            </div>
          </div>
          <p>
        In YAML <a id="id2777542" class="indexterm"></a><a class="link" href="#style/block/">block
        styles</a>, structure is determined by <a id="id2777558" class="indexterm"></a><a id="space/indentation/"></a><em class="firstterm">indentation</em>. In general, indentation
        is defined as a zero or more <a id="id2777575" class="indexterm"></a><a class="link" href="#space//">space</a>
        characters at the start of a line.
      </p>
          <p>
        To maintain portability, <a id="id2777592" class="indexterm"></a><a class="link" href="#tab//">tab</a>
        characters must not be used in indentation, since different systems
        treat <a id="id2777606" class="indexterm"></a><a class="link" href="#tab//">tabs</a> differently. Note that most
        modern editors may be configured so that pressing the <a id="id2777619" class="indexterm"></a><a class="link" href="#tab//">tab</a> key results in the insertion of an
        appropriate number of <a id="id2777633" class="indexterm"></a><a class="link" href="#space//">spaces</a>.
      </p>
          <p>
        The amount of indentation is a <a id="id2777649" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be used
        to convey <a id="id2777666" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[63]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-indent(n)"></a>s-indent(n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-space">s-space</a> × n
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        A <a id="id2777702" class="indexterm"></a><a class="link" href="#style/block/">block style</a>
        construct is terminated when encountering a line which is less indented
        than the construct. The productions use the notation
        “<span class="quote"><strong class="userinput"><code>s-indent(&lt;n)</code></strong></span>” and “<span class="quote"><strong class="userinput"><code>s-indent(≤n)</code></strong></span>”
        to express this.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[64]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-indent(&lt;n)"></a>s-indent(&lt;n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-space">s-space</a> × <code class="varname">m</code>
            /* Where <code class="varname">m</code> &lt; <code class="varname">n</code> */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[65]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-indent(≤n)"></a>s-indent(≤n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-space">s-space</a> × <code class="varname">m</code>
            /* Where <code class="varname">m</code> ≤ <code class="varname">n</code> */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        Each <a id="id2777798" class="indexterm"></a><a class="link" href="#node//">node</a> must be indented further
        than its parent <a id="id2777812" class="indexterm"></a><a class="link" href="#node//">node</a>. All sibling
        <a id="id2777824" class="indexterm"></a><a class="link" href="#node//">nodes</a> must use the exact same
        indentation level. However the <a id="id2777838" class="indexterm"></a><a class="link" href="#content//">content</a> of each sibling <a id="id2777851" class="indexterm"></a><a class="link" href="#node//">node</a> may be further indented independently.
      </p>
          <div class="example">
            <a id="id2777865"></a>
            <p class="title">
              <b>Example&nbsp;6.1.&nbsp;Indentation Spaces</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><span class="property">··</span># Leading comment line spaces are<br><span class="property">···</span># neither content nor indentation.
<span class="property">····</span>
Not indented:
<code class="filename">·</code>By one space: |
<code class="filename">····</code>By four
<code class="filename">····</code><code class="literal">··</code>spaces
<code class="filename">·</code>Flow style: [    # Leading spaces
<code class="filename">··</code><span class="property">·</span>By two,        # in flow style
<code class="filename">··</code>Also by two,    # are neither
<code class="filename">··</code>→Still by two   # content nor
<code class="filename">··</code><span class="property">··</span>]             # indentation.
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-indent%28n%29">s-indent(n)</a></code> <code class="literal">Content</code>
  <span class="property">Neither content nor indentation</span>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>- - -
!!map {
  ? !!str "Not indented"
  : !!map {
      ? !!str "By one space"
      : !!str "By four\n  spaces\n",
      ? !!str "Flow style"
      : !!seq [
          !!str "By two",
          !!str "Also by two",
          !!str "Still by two",
        ]
    }
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        The <a id="id2778026" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>”</a>, <a id="id2778045" class="indexterm"></a><a class="link" href="#?%20mapping%20key//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”</a> and <a id="id2778062" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:</code></strong></span>”</a> characters used to denote <a id="id2778080" class="indexterm"></a><a class="link" href="#style/block/collection">block
        collection</a> entries are perceived by people to be part of the
        indentation. This is handled on a case-by-case basis by the relevant
        productions.
      </p>
          <div class="example">
            <a id="id2778101"></a>
            <p class="title">
              <b>Example&nbsp;6.2.&nbsp;Indentation Indicators</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><span class="honorific"><code class="filename"><span class="property">?</span></code></span>·a<br><span class="honorific"><code class="filename"><span class="property">:</span><code class="literal">·</code><span class="property">-</span></code></span>→b
<span class="honorific"><code class="filename"><code class="literal">··</code><span class="property">-</span><code class="literal">··</code><span class="property">-</span></code></span>→c
<span class="honorific"><code class="filename"><code class="literal">·····</code><span class="property">-</span></code></span>·d
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename">Total Indentation</code>
  <code class="literal"><a class="link" href="#s-indent%28n%29">s-indent(n)</a></code> <span class="property">Indicator as indentation</span>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "a"
  : !!seq [
    !!str "b",
    !!seq [ !!str "c", !!str "d" ]
  ],
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2778241"></a>6.2.&nbsp;Separation Spaces</h2>
              </div>
            </div>
          </div>
          <p>
        Outside <a id="id2778250" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> and <a id="id2778265" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>, YAML uses <a id="id2778278" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters for
        <a id="id2778294" class="indexterm"></a><a id="space/separation/"></a><em class="firstterm">separation</em>
        between tokens within a line. Note that such <a id="id2778311" class="indexterm"></a><a class="link" href="#space/white/">white space</a> may safely include <a id="id2778327" class="indexterm"></a><a class="link" href="#tab//">tab</a> characters.
      </p>
          <p>
        Separation spaces are a <a id="id2778343" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be used
        to convey <a id="id2778360" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[66]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-separate-in-line"></a>s-separate-in-line</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
              <a href="#s-white">s-white</a>+ | /* Start of line */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2778394"></a>
            <p class="title">
              <b>Example&nbsp;6.3.&nbsp;Separation Spaces</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">-<code class="filename">·</code>foo:<code class="filename">→·</code>bar<br>- -<code class="filename">·</code>baz
  -<code class="filename">→</code>baz
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-separate-in-line">s-separate-in-line</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!map {
    ? !!str "foo" : !!str "bar",
  },
  !!seq [ !!str "baz", !!str "baz" ],
]
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2778481"></a>6.3.&nbsp;Line Prefixes</h2>
              </div>
            </div>
          </div>
          <p>
        Inside <a id="id2778489" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>, each line
        begins with a non-<a id="id2778503" class="indexterm"></a><a class="link" href="#content//">content</a> <a id="id2778515" class="indexterm"></a><a id="line prefix//"></a><em class="firstterm">line prefix</em>. This prefix always
        includes the <a id="id2778530" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a>. For <a id="id2778546" class="indexterm"></a><a class="link" href="#style/flow/scalar">flow scalar
        styles</a> it additionally includes all leading <a id="id2778564" class="indexterm"></a><a class="link" href="#space/white/">white space</a>, which may
        contain <a id="id2778580" class="indexterm"></a><a class="link" href="#tab//">tab</a> characters.
      </p>
          <p>
        Line prefixes are a <a id="id2778596" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be used
        to convey <a id="id2778612" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[67]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-line-prefix(n,c)"></a>s-line-prefix(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <code class="varname">c</code> = block-out ⇒
            <a href="#s-block-line-prefix%28n%29">s-block-line-prefix(n)</a><br>
            <code class="varname">c</code> = block-in&nbsp; ⇒
            <a href="#s-block-line-prefix%28n%29">s-block-line-prefix(n)</a><br>
            <code class="varname">c</code> = flow-out&nbsp; ⇒
            <a href="#s-flow-line-prefix%28n%29">s-flow-line-prefix(n)</a><br>
            <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒
            <a href="#s-flow-line-prefix%28n%29">s-flow-line-prefix(n)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[68]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-block-line-prefix(n)"></a>s-block-line-prefix(n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-indent%28n%29">s-indent(n)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[69]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-flow-line-prefix(n)"></a>s-flow-line-prefix(n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-indent%28n%29">s-indent(n)</a>
            <a href="#s-separate-in-line">s-separate-in-line</a>?
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2778720"></a>
            <p class="title">
              <b>Example&nbsp;6.4.&nbsp;Line Prefixes</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">plain: text<br><span class="honorific"><code class="filename"><span class="property">·</span>·</code></span>lines
quoted: "text
<span class="honorific"><code class="filename"><span class="property">·</span>·→</code></span>lines"
block: |
<span class="honorific"><code class="literal"><span class="property">··</span></code></span>text
<span class="honorific"><code class="literal"><span class="property">··</span></code></span>·→lines
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-flow-line-prefix%28n%29">s-flow-line-prefix(n)</a></code> <code class="literal"><a class="link" href="#s-block-line-prefix%28n%29">s-block-line-prefix(n)</a></code> <span class="property"><a class="link" href="#s-indent%28n%29">s-indent(n)</a></span>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "plain"
  : !!str "text lines",
  ? !!str "quoted"
  : !!str "text lines",
  ? !!str "block"
  : !!str "text\n·→lines\n",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2778853"></a>6.4.&nbsp;Empty Lines</h2>
              </div>
            </div>
          </div>
          <p>
        An <a id="id2778862" class="indexterm"></a><a id="empty line//"></a><em class="firstterm">empty line</em> line consists of
        the non-<a id="id2778876" class="indexterm"></a><a class="link" href="#content//">content</a> <a id="id2778888" class="indexterm"></a><a class="link" href="#line%20prefix//">prefix</a> followed by a <a id="id2778902" class="indexterm"></a><a class="link" href="#line%20break//">line break</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[70]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="l-empty(n,c)"></a>l-empty(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            ( <a href="#s-line-prefix%28n,c%29">s-line-prefix(n,c)</a>
            | <a href="#s-indent%28n%29">s-indent(&lt;n)</a> )<br>
            <a href="#b-as-line-feed">b-as-line-feed</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        The semantics of empty lines depend on the <a id="id2778953" class="indexterm"></a><a class="link" href="#style/scalar/">scalar style</a> they appear in. This is
        handled on a case-by-case basis by the relevant productions.
      </p>
          <div class="example">
            <a id="id2778971"></a>
            <p class="title">
              <b>Example&nbsp;6.5.&nbsp;Empty Lines</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">Folding:<br>  "Empty line
<code class="filename">···→</code>
  as a line feed"
Chomping: |
  Clipped empty lines
<code class="filename">·</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#l-empty%28n,c%29">l-empty(n,c)</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "Folding"
  : !!str "Empty line\nas a line feed",
  ? !!str "Chomping"
  : !!str "Clipped empty lines\n",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2779048"></a>6.5.&nbsp;Line Folding</h2>
              </div>
            </div>
          </div>
          <p>
        <a id="id2779056" class="indexterm"></a><a id="line folding//"></a><em class="firstterm">Line folding</em> allows long
        lines to be broken for readability, while retaining the semantics of
        the original long line. If a <a id="id2779072" class="indexterm"></a><a class="link" href="#line%20break//">line
        break</a> is followed by an <a id="id2779085" class="indexterm"></a><a class="link" href="#empty%20line//">empty
        line</a>, it is <a id="id2779098" class="indexterm"></a><a id="trimming//"></a><em class="firstterm">trimmed</em>;
        the first <a id="id2779113" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> is
        discarded and the rest are retained as <a id="id2779127" class="indexterm"></a><a class="link" href="#content//">content</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[71]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-l-trimmed(n,c)"></a>b-l-trimmed(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-non-content">b-non-content</a>
            <a href="#l-empty%28n,c%29">l-empty(n,c)</a>+
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        Otherwise (the following line is not <a id="id2779168" class="indexterm"></a><a class="link" href="#empty%20line//">empty</a>), the <a id="id2779182" class="indexterm"></a><a class="link" href="#line%20break//">line
        break</a> is converted to a single <a id="id2779195" class="indexterm"></a><a class="link" href="#space//">space</a> (<strong class="userinput"><code>#x20</code></strong>).
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[72]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-as-space"></a>b-as-space</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-break">b-break</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        A folded non-<a id="id2779236" class="indexterm"></a><a class="link" href="#empty%20line//">empty line</a> may end
        with either of the above <a id="id2779250" class="indexterm"></a><a class="link" href="#line%20break//">line
        breaks</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[73]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-l-folded(n,c)"></a>b-l-folded(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-l-trimmed%28n,c%29">b-l-trimmed(n,c)</a>
            | <a href="#b-as-space">b-as-space</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2779289"></a>
            <p class="title">
              <b>Example&nbsp;6.6.&nbsp;Line Folding</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">&gt;-<br>  trimmed<code class="filename">↓
··↓
·↓
↓</code>
  as<code class="literal">↓</code>
  space
</span></pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "trimmed\n\n\nas space"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#b-l-trimmed%28n,c%29">b-l-trimmed(n,c)</a></code>
   <code class="literal"><a class="link" href="#b-as-space">b-as-space</a></code>
</pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        The above rules are common to both the <a id="id2779377" class="indexterm"></a><a class="link" href="#style/block/folded">folded block style</a> and
        the <a id="id2779395" class="indexterm"></a><a class="link" href="#style/flow/scalar">scalar
        flow styles</a>. Folding does distinguish between these cases in
        the following way:
      </p>
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">Block Folding</span>
              </dt>
              <dd>
                <p>
              In the <a id="id2779428" class="indexterm"></a><a class="link" href="#style/block/folded">folded block style</a>, the final
              <a id="id2779446" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> and trailing
              <a id="id2779460" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are subject
              to <a id="id2779474" class="indexterm"></a><a class="link" href="#chomping//">chomping</a>, and are never
              folded. In addition, folding does not apply to <a id="id2779487" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> surrounding text lines
              that contain leading <a id="id2779501" class="indexterm"></a><a class="link" href="#space/white/">white space</a>. Note that such a
              <a id="id2779517" class="indexterm"></a><a class="link" href="#more-indented//">more-indented</a> line may
              consist only of such leading <a id="id2779530" class="indexterm"></a><a class="link" href="#space/white/">white space</a>.
            </p>
                <p>
              The combined effect of the <a id="id2779550" class="indexterm"></a><a id="line folding/block/"></a><em class="firstterm">block line folding</em> rules is that each
              “<span class="quote">paragraph</span>” is interpreted as a line, <a id="id2779571" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are interpreted as a
              line feed, and the formatting of <a id="id2779586" class="indexterm"></a><a class="link" href="#more-indented//">more-indented</a> lines is
              preserved.
            </p>
              </dd>
            </dl>
          </div>
          <div class="example">
            <a id="id2779603"></a>
            <p class="title">
              <b>Example&nbsp;6.7.&nbsp;Block Folding</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">&gt;<br><code class="literal">··</code>foo<span class="property">·</span><code class="filename">↓</code>
<code class="filename">·↓</code>
<code class="literal">··</code><span class="property">→·</span>bar<code class="filename">↓</code>
<code class="filename">↓</code>
<code class="literal">··</code>baz↓
</span></pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>--- !!str
"foo \n\n\t bar\n\nbaz\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#b-l-folded%28n,c%29">b-l-folded(n,c)</a></code>
   <code class="literal">Non-content spaces</code> <span class="property">Content spaces</span>
</pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">Flow Folding</span>
              </dt>
              <dd>
                <p>
              Folding in <a id="id2779740" class="indexterm"></a><a class="link" href="#style/flow/">flow
              styles</a> provides more relaxed semantics. <a id="id2779756" class="indexterm"></a><a class="link" href="#style/flow/">Flow styles</a> typically
              depend on explicit <a id="id2779771" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> rather than <a id="id2779784" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> to
              convey structure. Hence spaces preceding or following the text in
              a line are a <a id="id2779801" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be
              used to convey <a id="id2779818" class="indexterm"></a><a class="link" href="#content//">content</a>
              information. Once all such spaces have been discarded, all
              <a id="id2779832" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> are folded,
              without exception.
            </p>
                <p>
              The combined effect of the <a id="id2779850" class="indexterm"></a><a id="line folding/flow/"></a><em class="firstterm">flow line folding</em> rules is that each
              “<span class="quote">paragraph</span>” is interpreted as a line, <a id="id2779871" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are interpreted as
              line feeds, and text can be freely <a id="id2779885" class="indexterm"></a><a class="link" href="#more-indented//">more-indented</a> without affecting
              the <a id="id2779899" class="indexterm"></a><a class="link" href="#content//">content</a> information.
            </p>
              </dd>
            </dl>
          </div>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[74]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-flow-folded(n)"></a>s-flow-folded(n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-separate-in-line">s-separate-in-line</a>?
            <a href="#b-l-folded%28n,c%29">b-l-folded(n,flow-in)</a><br>
            <a href="#s-flow-line-prefix%28n%29">s-flow-line-prefix(n)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2779950"></a>
            <p class="title">
              <b>Example&nbsp;6.8.&nbsp;Flow Folding</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">"<span class="honorific"><code class="filename">↓<br><code class="literal">··</code></code></span>foo<span class="honorific"><code class="filename"><code class="literal">·</code>↓
<code class="literal">·</code>↓
<code class="literal">··→·</code></code></span>bar<span class="honorific"><code class="filename">↓
↓
<code class="literal">··</code></code></span>baz<code class="filename">↓
</code>"
</span></pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>--- !!str
" foo\nbar\nbaz "
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#s-flow-folded%28n%29">s-flow-folded(n)</a></code>
   <code class="literal">Non-content spaces</code>
</pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2780069"></a>6.6.&nbsp;Comments</h2>
              </div>
            </div>
          </div>
          <p>
        An explicit <a id="id2780077" class="indexterm"></a><a id="comment//"></a><em class="firstterm">comment</em> is marked by a
        <a id="id2780091" class="indexterm"></a><a id="# comment//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>#</code></strong></span>” indicator</em>.
        Comments are a <a id="id2780110" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be used
        to convey <a id="id2780127" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <p>
        Comments must be <a id="id2780143" class="indexterm"></a><a class="link" href="#space/separation/">separated</a> from other tokens by
        <a id="id2780160" class="indexterm"></a><a class="link" href="#space/white/">white space</a>
        characters. To ensure <a id="id2780176" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON
        compatibility</a>, YAML <a id="id2780189" class="indexterm"></a><a class="link" href="#processor//">processors</a> must allow for the omission of
        the final comment <a id="id2780203" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> of
        the input <a id="id2780216" class="indexterm"></a><a class="link" href="#stream//">stream</a>. However, as this
        confuses many tools, YAML <a id="id2780230" class="indexterm"></a><a class="link" href="#processor//">processors</a> should terminate the <a id="id2780242" class="indexterm"></a><a class="link" href="#stream//">stream</a> with an explicit <a id="id2780255" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> on output.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[75]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-nb-comment-text"></a>c-nb-comment-text</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#c-comment">“<span class="quote">#</span>”</a>
            <a href="#nb-char">nb-char</a>*
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[76]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="b-comment"></a>b-comment</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#b-non-content">b-non-content</a> | /* End of file */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[77]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-b-comment"></a>s-b-comment</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            ( <a href="#s-separate-in-line">s-separate-in-line</a>
            <a href="#c-nb-comment-text">c-nb-comment-text</a>? )?<br>
            <a href="#b-comment">b-comment</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2780342"></a>
            <p class="title">
              <b>Example&nbsp;6.9.&nbsp;Separated Comment</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">key:<span class="honorific"><span class="property">····<code class="filename"># Comment</code><code class="literal">↓</code></span></span><br>  value<span class="honorific"><span class="property"><code class="literal"><span class="emphasis"><em>eof</em></span></code></span></span>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-nb-comment-text">c-nb-comment-text</a></code> <code class="literal"><a class="link" href="#b-comment">b-comment</a></code>
  <span class="property"><a class="link" href="#s-b-comment">s-b-comment</a></span>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "key"
  : !!str "value",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        Outside <a id="id2780455" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>, comments
        may appear on a line of their own, independent of the <a id="id2780469" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> level.
        Note that outside <a id="id2780485" class="indexterm"></a><a class="link" href="#scalar//">scalar content</a>, a
        line containing only <a id="id2780498" class="indexterm"></a><a class="link" href="#space/white/">white
        space</a> characters is taken to be a comment line.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[78]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="l-comment"></a>l-comment</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#s-separate-in-line">s-separate-in-line</a>
            <a href="#c-nb-comment-text">c-nb-comment-text</a>?
            <a href="#b-comment">b-comment</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2780544"></a>
            <p class="title">
              <b>Example&nbsp;6.10.&nbsp;Comment Lines</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><span class="honorific"><code class="literal">··<code class="filename"># Comment↓</code></code></span><br><span class="honorific"><code class="literal">···<code class="filename">↓</code></code></span>
<span class="honorific"><code class="literal"><code class="filename">↓</code></code></span>
</span></pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database"># This stream contains no<br># documents, only comments.
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#s-b-comment">s-b-comment</a></code> <code class="literal"><a class="link" href="#l-comment">l-comment</a></code>
</pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        In most cases, when a line may end with a comment, YAML allows it to be
        followed by additional comment lines. The only exception is a comment
        ending a <a id="id2780652" class="indexterm"></a><a class="link" href="#block%20scalar%20header//">block scalar
        header</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[79]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-l-comments"></a>s-l-comments</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            ( <a href="#s-b-comment">s-b-comment</a> | /* Start of line */ )<br>
            <a href="#l-comment">l-comment</a>*
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2780696"></a>
            <p class="title">
              <b>Example&nbsp;6.11.&nbsp;Multi-Line Comments</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">key:<span class="honorific"><span class="property"><code class="filename">····# Comment↓</code><br><code class="literal">········# lines↓</code></span></span>
  value<span class="honorific"><span class="property"><code class="filename">↓</code>
<code class="literal">↓</code></span></span>
</span></pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "key"
  : !!str "value",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
              <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-b-comment">s-b-comment</a></code> <code class="literal"><a class="link" href="#l-comment">l-comment</a></code> <span class="property"><a class="link" href="#s-l-comments">s-l-comments</a></span>
</pre>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2780810"></a>6.7.&nbsp;Separation Lines</h2>
              </div>
            </div>
          </div>
          <p>
        <a id="id2780818" class="indexterm"></a><a class="link" href="#key/implicit/">Implicit keys</a> are
        restricted to a single line. In all other cases, YAML allows tokens to
        be separated by multi-line (possibly empty) <a id="id2780836" class="indexterm"></a><a class="link" href="#comment//">comments</a>.
      </p>
          <p>
        Note that structures following multi-line comment separation must be
        properly <a id="id2780854" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a>, even though there is no
        such restriction on the separation <a id="id2780871" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines themselves.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[80]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-separate(n,c)"></a>s-separate(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <code class="varname">c</code> = block-out ⇒
            <a href="#s-separate-lines%28n%29">s-separate-lines(n)</a><br>
            <code class="varname">c</code> = block-in&nbsp; ⇒
            <a href="#s-separate-lines%28n%29">s-separate-lines(n)</a><br>
            <code class="varname">c</code> = flow-out&nbsp; ⇒
            <a href="#s-separate-lines%28n%29">s-separate-lines(n)</a><br>
            <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒
            <a href="#s-separate-lines%28n%29">s-separate-lines(n)</a><br>
            <code class="varname">c</code> = block-key ⇒
            <a href="#s-separate-in-line">s-separate-in-line</a><br>
            <code class="varname">c</code> = flow-key&nbsp; ⇒
            <a href="#s-separate-in-line">s-separate-in-line</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[81]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="s-separate-lines(n)"></a>s-separate-lines(n)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;( <a href="#s-l-comments">s-l-comments</a>
            <a href="#s-flow-line-prefix%28n%29">s-flow-line-prefix(n)</a> )<br>
            | <a href="#s-separate-in-line">s-separate-in-line</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2780989"></a>
            <p class="title">
              <b>Example&nbsp;6.12.&nbsp;Separation Spaces</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">{<code class="filename">·</code>first:<code class="filename">·</code>Sammy,<code class="filename">·</code>last:<code class="filename">·</code>Sosa<code class="filename">·</code>}:<span class="honorific"><code class="literal">↓<br># Statistics:
<span class="property">··</span></code></span>hr:<span class="honorific"><code class="literal">··# Home runs
<span class="property">···</span>··</code></span>65
<span class="property">··</span>avg:<span class="honorific"><code class="literal">·# Average
<span class="property">···</span></code></span>0.278
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-separate-in-line">s-separate-in-line</a></code>
  <code class="literal"><a class="link" href="#s-separate-lines%28n%29">s-separate-lines(n)</a></code>
  <span class="property"><a class="link" href="#s-indent%28n%29">s-indent(n)</a></span>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!map {
    ? !!str "first"
    : !!str "Sammy",
    ? !!str "last"
    : !!str "Sosa",
  }
  : !!map {
    ? !!str "hr"
    : !!int "65",
    ? !!str "avg"
    : !!float "0.278",
  },
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2781147"></a>6.8.&nbsp;Directives</h2>
              </div>
            </div>
          </div>
          <p>
        <a id="id2781155" class="indexterm"></a><a id="directive//"></a><em class="firstterm">Directives</em> are instructions to
        the YAML <a id="id2781169" class="indexterm"></a><a class="link" href="#processor//">processor</a>. This
        specification defines two directives, <a id="id2781183" class="indexterm"></a><a class="link" href="#directive/YAML/">“<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>”</a> and <a id="id2781203" class="indexterm"></a><a class="link" href="#directive/TAG/">“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”</a>, and
        <a id="id2781222" class="indexterm"></a><a id="directive/reserved/"></a><em class="firstterm">reserves</em>
        all other directives for future use. There is no way to define private
        directives. This is intentional.
      </p>
          <p>
        Directives are a <a id="id2781245" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be used
        to convey <a id="id2781261" class="indexterm"></a><a class="link" href="#content//">content</a> information.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[82]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="l-directive"></a>l-directive</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#c-directive">“<span class="quote">%</span>”</a><br>
            ( <a href="#ns-yaml-directive">ns-yaml-directive</a><br>
            | <a href="#ns-tag-directive">ns-tag-directive</a><br>
            | <a href="#ns-reserved-directive">ns-reserved-directive</a> )<br>
            <a href="#s-l-comments">s-l-comments</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        Each directive is specified on a separate non-<a id="id2781327" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> line starting with the
        <a id="id2781343" class="indexterm"></a><a id="% directive//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>” indicator</em>,
        followed by the directive name and a list of parameters. The semantics
        of these parameters depends on the specific directive. A YAML <a id="id2781365" class="indexterm"></a><a class="link" href="#processor//">processor</a> should ignore unknown
        directives with an appropriate warning.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[83]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-reserved-directive"></a>ns-reserved-directive</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-directive-name">ns-directive-name</a><br>
            ( <a href="#s-separate-in-line">s-separate-in-line</a>
              <a href="#ns-directive-parameter">ns-directive-parameter</a> )*
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[84]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-directive-name"></a>ns-directive-name</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-char">ns-char</a>+
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[85]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-directive-parameter"></a>ns-directive-parameter</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-char">ns-char</a>+
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2781445"></a>
            <p class="title">
              <b>Example&nbsp;6.13.&nbsp;Reserved Directives</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">%<span class="honorific"><code class="filename"><code class="literal">FOO</code>  <span class="property">bar</span> <span class="property">baz</span></code></span> # Should be ignored<br>               # with a warning.
--- "foo"
</span></pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>--- !!str
"foo"
</span></pre>
          </td>
                </tr>
              </tbody></table>
              <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-reserved-directive">ns-reserved-directive</a></code> <code class="literal"><a class="link" href="#ns-directive-name">ns-directive-name</a></code> <span class="property"><a class="link" href="#ns-directive-parameter">ns-directive-parameter</a></span>
</pre>
            </div>
          </div>
          <br class="example-break">
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2781553"></a>6.8.1.&nbsp;“<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>” Directives</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2781567" class="indexterm"></a><a id="directive/YAML/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>” directive</em> specifies
          the version of YAML the <a id="id2781591" class="indexterm"></a><a class="link" href="#document//">document</a> conforms to. This specification
          defines version “<span class="quote"><strong class="userinput"><code>1.2</code></strong></span>”, including recommendations for
          <a id="id2781612" class="indexterm"></a><a id="YAML 1.1 processing//"></a><em class="firstterm">YAML 1.1 processing</em>.
        </p>
            <p>
          A version 1.2 YAML <a id="id2781631" class="indexterm"></a><a class="link" href="#processor//">processor</a>
          must accept <a id="id2781643" class="indexterm"></a><a class="link" href="#document//">documents</a> with an
          explicit “<span class="quote"><strong class="userinput"><code>%YAML 1.2</code></strong></span>” directive, as well as <a id="id2781664" class="indexterm"></a><a class="link" href="#document//">documents</a> lacking a
          “<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>” directive. Such <a id="id2781684" class="indexterm"></a><a class="link" href="#document//">documents</a> are assumed to conform to the
          1.2 version specification. <a id="id2781698" class="indexterm"></a><a class="link" href="#document//">Documents</a> with a “<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>”
          directive specifying a higher minor version (e.g.
          “<span class="quote"><strong class="userinput"><code>%YAML&nbsp;1.3</code></strong></span>”) should be processed with an
          appropriate warning. <a id="id2781727" class="indexterm"></a><a class="link" href="#document//">Documents</a>
          with a “<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>” directive specifying a higher major
          version (e.g. “<span class="quote"><strong class="userinput"><code>%YAML&nbsp;2.0</code></strong></span>”) should be rejected
          with an appropriate error message.
        </p>
            <p>
          A version 1.2 YAML <a id="id2781760" class="indexterm"></a><a class="link" href="#processor//">processor</a>
          must also accept <a id="id2781773" class="indexterm"></a><a class="link" href="#document//">documents</a> with
          an explicit “<span class="quote"><strong class="userinput"><code>%YAML 1.1</code></strong></span>” directive. Note that version
          1.2 is mostly a superset of version 1.1, defined for the purpose of
          ensuring <a id="id2781795" class="indexterm"></a><a id="JSON compatibility//"></a><em class="firstterm">JSON
          compatibility</em>. Hence a version 1.2 <a id="id2781810" class="indexterm"></a><a class="link" href="#processor//">processor</a> should process version 1.1
          <a id="id2781824" class="indexterm"></a><a class="link" href="#document//">documents</a> as if they were
          version 1.2, giving a warning on points of incompatibility (handling
          of <a id="id2781838" class="indexterm"></a><a class="link" href="#line%20break/non-ASCII/">non-ASCII line
          breaks</a>, as described <a class="link" href="#non-ASCII%20line%20breaks">above</a>).
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[86]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-yaml-directive"></a>ns-yaml-directive</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              “<span class="quote">Y</span>” “<span class="quote">A</span>”
              “<span class="quote">M</span>” “<span class="quote">L</span>”<br>
              <a href="#s-separate-in-line">s-separate-in-line</a>
              <a href="#ns-yaml-version">ns-yaml-version</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[87]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-yaml-version"></a>ns-yaml-version</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-dec-digit">ns-dec-digit</a>+
              “<span class="quote">.</span>”
              <a href="#ns-dec-digit">ns-dec-digit</a>+
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2781929"></a>
              <p class="title">
                <b>Example&nbsp;6.14.&nbsp;“<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>” directive</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">%<span class="honorific"><code class="filename">YAML <code class="literal">1.3</code></code></span> # Attempt parsing<br>           # with a warning
---
"foo"
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "foo"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#ns-yaml-directive">ns-yaml-directive</a></code> <code class="literal"><a class="link" href="#ns-yaml-version">ns-yaml-version</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          It is an error to specify more than one “<span class="quote"><strong class="userinput"><code>YAML</code></strong></span>”
          directive for the same document, even if both occurrences give the
          same version number.
        </p>
            <div class="example">
              <a id="id2782032"></a>
              <p class="title">
                <b>Example&nbsp;6.15.&nbsp;Invalid Repeated YAML directive</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="screen"><span class="database">%YAML 1.2<br>%<code class="filename">YAML</code> 1.1
foo
</span></pre>
            </td>
                    <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>The <code class="filename">YAML</code> directive must only be
given at most once per document.
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2782090"></a>6.8.2.&nbsp;“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” Directives</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2782103" class="indexterm"></a><a id="directive/TAG/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”
          directive</em> establishes a <a id="id2782126" class="indexterm"></a><a class="link" href="#tag/shorthand/">tag shorthand</a> notation for specifying
          <a id="id2782141" class="indexterm"></a><a class="link" href="#tag//">node tags</a>. Each “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”
          directive associates a <a id="id2782161" class="indexterm"></a><a class="link" href="#tag/handle/">handle</a> with a <a id="id2782176" class="indexterm"></a><a class="link" href="#tag/prefix/">prefix</a>. This allows for compact and
          readable <a id="id2782193" class="indexterm"></a><a class="link" href="#tag//">tag</a> notation.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[88]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-tag-directive"></a>ns-tag-directive</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              “<span class="quote">T</span>” “<span class="quote">A</span>” “<span class="quote">G</span>”<br>
              <a href="#s-separate-in-line">s-separate-in-line</a>
              <a href="#c-tag-handle">c-tag-handle</a><br>
              <a href="#s-separate-in-line">s-separate-in-line</a>
              <a href="#ns-tag-prefix">ns-tag-prefix</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2782252"></a>
              <p class="title">
                <b>Example&nbsp;6.16.&nbsp;“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” directive</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">%<span class="honorific"><code class="filename">TAG <code class="literal">!yaml!</code> <span class="property">tag:yaml.org,2002:</span></code></span><br>---
!yaml!str "foo"
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "foo"
</span></pre>
            </td>
                  </tr>
                </tbody></table>
                <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-tag-directive">ns-tag-directive</a></code> <code class="literal"><a class="link" href="#c-tag-handle">c-tag-handle</a></code> <span class="property"><a class="link" href="#ns-tag-prefix">ns-tag-prefix</a></span>
</pre>
              </div>
            </div>
            <br class="example-break">
            <p>
          It is an error to specify more than one “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”
          directive for the same <a id="id2782369" class="indexterm"></a><a class="link" href="#tag/handle/">handle</a> in the same document, even if
          both occurrences give the same <a id="id2782385" class="indexterm"></a><a class="link" href="#tag/prefix/">prefix</a>.
        </p>
            <div class="example">
              <a id="id2782400"></a>
              <p class="title">
                <b>Example&nbsp;6.17.&nbsp;Invalid Repeated TAG directive</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="screen"><span class="database">%TAG ! !foo<br>%TAG <code class="filename">!</code> !foo
bar
</span></pre>
            </td>
                    <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>The TAG directive must only
be given at most once per
<code class="filename">handle</code> in the same document.
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2782457"></a>6.8.2.1.&nbsp;Tag Handles</h4>
                  </div>
                </div>
              </div>
              <p>
            The <a id="id2782466" class="indexterm"></a><a id="tag/handle/"></a><em class="firstterm">tag handle</em>
            exactly matches the prefix of the affected <a id="id2782482" class="indexterm"></a><a class="link" href="#tag/shorthand/">tag shorthand</a>. There are three tag
            handle variants:
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[89]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-tag-handle"></a>c-tag-handle</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                &nbsp;&nbsp;<a href="#c-named-tag-handle">c-named-tag-handle</a><br>
                | <a href="#c-secondary-tag-handle">c-secondary-tag-handle</a><br>
                | <a href="#c-primary-tag-handle">c-primary-tag-handle</a>
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Primary Handle</span>
                  </dt>
                  <dd>
                    <p>
                  The <a id="id2782545" class="indexterm"></a><a id="tag/handle/primary"></a><em class="firstterm">primary tag handle</em> is a single
                  <a id="id2782565" class="indexterm"></a><a id="! tag indicator/! primary tag handle/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</em> character. This allows
                  using the most compact possible notation for a single
                  “<span class="quote">primary</span>” name space. By default, the prefix
                  associated with this handle is <a id="id2782596" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20local%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a>. Thus, by default, <a id="id2782618" class="indexterm"></a><a class="link" href="#tag/shorthand/">shorthands</a>
                  using this handle are interpreted as <a id="id2782634" class="indexterm"></a><a class="link" href="#tag/local/">local tags</a>.
                </p>
                    <p>
                  It is possible to override the default behavior by providing
                  an explicit “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” directive, associating a
                  different prefix for this handle. This provides smooth
                  migration from using <a id="id2782663" class="indexterm"></a><a class="link" href="#tag/local/">local tags</a> to using <a id="id2782678" class="indexterm"></a><a class="link" href="#tag/global/">global tags</a>, by
                  the simple addition of a single “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>”
                  directive.
                </p>
                  </dd>
                </dl>
              </div>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[90]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-primary-tag-handle"></a>c-primary-tag-handle</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#c-tag">“<span class="quote">!</span>”</a>
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2782728"></a>
                <p class="title">
                  <b>Example&nbsp;6.18.&nbsp;Primary Tag Handle</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database"># Private<br><code class="filename">!</code>foo "bar"
...
# Global
%TAG <code class="filename">!</code> tag:example.com,2000:app/
---
<code class="filename">!</code>foo "bar"
</span></pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!&lt;!foo&gt; "bar"
...
---
!&lt;tag:example.com,2000:app/foo&gt; "bar"
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-primary-tag-handle">c-primary-tag-handle</a></code>
</pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Secondary Handle</span>
                  </dt>
                  <dd>
                    <p>
                  The <a id="id2782822" class="indexterm"></a><a id="tag/handle/secondary"></a><em class="firstterm">secondary tag handle</em> is
                  written as <a id="id2782842" class="indexterm"></a><a id="! tag indicator/!! secondary tag handle/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>!!</code></strong></span>”</em>. This
                  allows using a compact notation for a single
                  “<span class="quote">secondary</span>” name space. By default, the prefix
                  associated with this handle is
                  “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:</code></strong></span>”. This prefix is used by
                  the <a id="id2782878" class="indexterm"></a><a class="link" href="#tag/repository/">YAML tag
                  repository</a>.
                </p>
                    <p>
                  It is possible to override this default behavior by providing
                  an explicit “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” directive associating a
                  different prefix for this handle.
                </p>
                  </dd>
                </dl>
              </div>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[91]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-secondary-tag-handle"></a>c-secondary-tag-handle</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#c-tag">“<span class="quote">!</span>”</a>
                <a href="#c-tag">“<span class="quote">!</span>”</a>
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2782940"></a>
                <p class="title">
                  <b>Example&nbsp;6.19.&nbsp;Secondary Tag Handle</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">%TAG <code class="filename">!!</code> tag:example.com,2000:app/<br>---
<code class="filename">!!</code>int 1 - 3 # Interval, not integer
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-secondary-tag-handle">c-secondary-tag-handle</a></code>
</pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!&lt;tag:example.com,2000:app/int&gt; "1 - 3"
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Named Handles</span>
                  </dt>
                  <dd>
                    <p>
                  A <a id="id2783028" class="indexterm"></a><a id="tag/handle/named"></a><em class="firstterm">named tag handle</em> surrounds a
                  non-empty name with <a id="id2783048" class="indexterm"></a><a id="! tag indicator/!…! named handle/"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</em> characters. A handle
                  name must not be used in a <a id="id2783073" class="indexterm"></a><a class="link" href="#tag/shorthand/">tag shorthand</a> unless an
                  explicit “<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” directive has associated some
                  prefix with it.
                </p>
                    <p>
                  The name of the handle is a <a id="id2783100" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not
                  be used to convey <a id="id2783117" class="indexterm"></a><a class="link" href="#content//">content</a> information. In
                  particular, the YAML <a id="id2783131" class="indexterm"></a><a class="link" href="#processor//">processor</a> need not preserve the
                  handle name once <a id="id2783144" class="indexterm"></a><a class="link" href="#parse//">parsing</a>
                  is completed.
                </p>
                  </dd>
                </dl>
              </div>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[92]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-named-tag-handle"></a>c-named-tag-handle</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#c-tag">“<span class="quote">!</span>”</a>
                <a href="#ns-word-char">ns-word-char</a>+
                <a href="#c-tag">“<span class="quote">!</span>”</a>
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2783195"></a>
                <p class="title">
                  <b>Example&nbsp;6.20.&nbsp;Tag Handles</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">%TAG <code class="filename">!e!</code> tag:example.com,2000:app/<br>---
<code class="filename">!e!</code>foo "bar"
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-named-tag-handle">c-named-tag-handle</a></code>
</pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!&lt;tag:example.com,2000:app/foo&gt; "bar"
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2783273"></a>6.8.2.2.&nbsp;Tag Prefixes</h4>
                  </div>
                </div>
              </div>
              <p>
            There are two <a id="id2783281" class="indexterm"></a><a id="tag/prefix/"></a><em class="firstterm">tag
            prefix</em> variants:
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[93]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="ns-tag-prefix"></a>ns-tag-prefix</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#c-ns-local-tag-prefix">c-ns-local-tag-prefix</a>
                | <a href="#ns-global-tag-prefix">ns-global-tag-prefix</a>
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Local Tag Prefix</span>
                  </dt>
                  <dd>
                If the prefix begins with a <a id="id2783335" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20local%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a> character,
                <a id="id2783354" class="indexterm"></a><a class="link" href="#tag/shorthand/">shorthands</a> using the <a id="id2783370" class="indexterm"></a><a class="link" href="#tag/handle/">handle</a> are expanded
                to a <a id="id2783385" class="indexterm"></a><a class="link" href="#tag/local/">local
                tag</a>. Note that such a <a id="id2783400" class="indexterm"></a><a class="link" href="#tag//">tag</a> is intentionally not a valid URI,
                and its semantics are specific to the <a id="id2783414" class="indexterm"></a><a class="link" href="#application//">application</a>. In particular, two
                <a id="id2783427" class="indexterm"></a><a class="link" href="#document//">documents</a> in the same
                <a id="id2783440" class="indexterm"></a><a class="link" href="#stream//">stream</a> may assign different
                semantics to the same <a id="id2783454" class="indexterm"></a><a class="link" href="#tag/local/">local tag</a>.
              </dd>
                </dl>
              </div>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[94]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-ns-local-tag-prefix"></a>c-ns-local-tag-prefix</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
              <a href="#c-tag">“<span class="quote">!</span>”</a>
                <a href="#ns-uri-char">ns-uri-char</a>*
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2783499"></a>
                <p class="title">
                  <b>Example&nbsp;6.21.&nbsp;Local Tag Prefix</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">%TAG !m! <code class="filename">!my-</code><br>--- # Bulb here
!m!light fluorescent
...
%TAG !m! <code class="filename">!my-</code>
--- # Color here
!m!light green
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-ns-local-tag-prefix">c-ns-local-tag-prefix</a></code>
</pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!&lt;!my-light&gt; "fluorescent"
...
%YAML 1.2
---
!&lt;!my-light&gt; "green"
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Global Tag Prefix</span>
                  </dt>
                  <dd>
                If the prefix begins with a character other than <a id="id2783587" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20local%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a>, it must to be a valid URI
                prefix, and should contain at least the scheme and the
                authority. <a id="id2783610" class="indexterm"></a><a class="link" href="#tag/shorthand/">Shorthands</a> using the associated
                <a id="id2783626" class="indexterm"></a><a class="link" href="#tag/handle/">handle</a> are
                expanded to globally unique URI tags, and their semantics is
                consistent across <a id="id2783642" class="indexterm"></a><a class="link" href="#application//">applications</a>. In particular,
                every <a id="id2783656" class="indexterm"></a><a class="link" href="#document//">documents</a> in every
                <a id="id2783669" class="indexterm"></a><a class="link" href="#stream//">stream</a> must assign the same
                semantics to the same <a id="id2783682" class="indexterm"></a><a class="link" href="#tag/global/">global tag</a>.
              </dd>
                </dl>
              </div>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[95]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="ns-global-tag-prefix"></a>ns-global-tag-prefix</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#ns-tag-char">ns-tag-char</a>
                <a href="#ns-uri-char">ns-uri-char</a>*
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2783726"></a>
                <p class="title">
                  <b>Example&nbsp;6.22.&nbsp;Global Tag Prefix</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">%TAG !e! <code class="filename">tag:example.com,2000:app/</code><br>---
- !e!foo "bar"
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-global-tag-prefix">ns-global-tag-prefix</a></code>
</pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!&lt;tag:example.com,2000:app/foo&gt; "bar"
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2783797"></a>6.9.&nbsp;Node Properties</h2>
              </div>
            </div>
          </div>
          <p>
        Each <a id="id2783806" class="indexterm"></a><a class="link" href="#node//">node</a> may have two optional
        <a id="id2783818" class="indexterm"></a><a id="node/property/"></a><em class="firstterm">properties</em>,
        <a id="id2783835" class="indexterm"></a><a class="link" href="#anchor//">anchor</a> and <a id="id2783847" class="indexterm"></a><a class="link" href="#tag//">tag</a>, in addition to its <a id="id2783860" class="indexterm"></a><a class="link" href="#content//">content</a>. Node properties may be specified
        in any order before the <a id="id2783873" class="indexterm"></a><a class="link" href="#content//">node’s
        content</a>. Either or both may be omitted.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[96]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-ns-properties(n,c)"></a>c-ns-properties(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;( <a href="#c-ns-tag-property">c-ns-tag-property</a><br>
            &nbsp;&nbsp;&nbsp;&nbsp;(
            <a href="#s-separate%28n,c%29">s-separate(n,c)</a>
            <a href="#c-ns-anchor-property">c-ns-anchor-property</a> )? )<br>
            | ( <a href="#c-ns-anchor-property">c-ns-anchor-property</a><br>
            &nbsp;&nbsp;&nbsp;&nbsp;(
            <a href="#s-separate%28n,c%29">s-separate(n,c)</a>
            <a href="#c-ns-tag-property">c-ns-tag-property</a> )? )
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2783940"></a>
            <p class="title">
              <b>Example&nbsp;6.23.&nbsp;Node Properties</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><span class="honorific"><code class="filename"><span class="property">!!str</span> <code class="literal">&amp;a1</code></code></span> "foo":<br>  <span class="honorific"><code class="filename"><span class="property">!!str</span></code></span> bar
<span class="honorific"><code class="filename"><code class="literal">&amp;a2</code></code></span> baz : *a1
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-ns-properties%28n,c%29">c-ns-properties(n,c)</a></code>
  <code class="literal"><a class="link" href="#c-ns-anchor-property">c-ns-anchor-property</a></code>
  <span class="property"><a class="link" href="#c-ns-tag-property">c-ns-tag-property</a></span>
</pre>
        </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? &amp;B1 !!str "foo"
  : !!str "bar",
  ? !!str "baz"
  : *B1,
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2784064"></a>6.9.1.&nbsp;Node Tags</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2784072" class="indexterm"></a><a id="tag/property/"></a><em class="firstterm">tag
          property</em> identifies the type of the <a id="id2784089" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structure</a>
          <a id="id2784102" class="indexterm"></a><a class="link" href="#present//">presented</a> by the <a id="id2784115" class="indexterm"></a><a class="link" href="#node//">node</a>. A tag is denoted by the <a id="id2784128" class="indexterm"></a><a id="! tag indicator//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>” indicator</em>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[97]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-tag-property"></a>c-ns-tag-property</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;<a href="#c-verbatim-tag">c-verbatim-tag</a><br>
              | <a href="#c-ns-shorthand-tag">c-ns-shorthand-tag</a><br>
              | <a href="#c-non-specific-tag">c-non-specific-tag</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="variablelist">
              <dl>
                <dt>
                  <span class="term">Verbatim Tags</span>
                </dt>
                <dd>
              A tag may be written <a id="id2784193" class="indexterm"></a><a id="tag/verbatim/"></a><em class="firstterm">verbatim</em> by surrounding it with
              the <a id="id2784210" class="indexterm"></a><a id="&lt;…&gt; verbatim tag//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>&lt;</code></strong></span>” and “<span class="quote"><strong class="userinput"><code>&gt;</code></strong></span>”</em>
              characters. In this case, the YAML <a id="id2784239" class="indexterm"></a><a class="link" href="#processor//">processor</a> must deliver the verbatim
              tag as-is to the <a id="id2784252" class="indexterm"></a><a class="link" href="#application//">application</a>. In particular,
              verbatim tags are not subject to <a id="id2784265" class="indexterm"></a><a class="link" href="#tag/resolution/">tag resolution</a>. A verbatim tag
              must either begin with a <a id="id2784281" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20local%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a> (a <a id="id2784302" class="indexterm"></a><a class="link" href="#tag/local/">local tag</a>) or be a
              valid URI (a <a id="id2784317" class="indexterm"></a><a class="link" href="#tag/global/">global
              tag</a>).
            </dd>
              </dl>
            </div>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[98]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-verbatim-tag"></a>c-verbatim-tag</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-tag">“<span class="quote">!</span>”</a>
              “<span class="quote">&lt;</span>”
              <a href="#ns-uri-char">ns-uri-char</a>+
              “<span class="quote">&gt;</span>”
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2784370"></a>
              <p class="title">
                <b>Example&nbsp;6.24.&nbsp;Verbatim Tags</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">!&lt;tag:yaml.org,2002:str&gt;</code> foo :<br>  <code class="filename">!&lt;!bar&gt;</code> baz
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-verbatim-tag">c-verbatim-tag</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !&lt;tag:yaml.org,2002:str&gt; "foo"
  : !&lt;!bar&gt; "baz",
}
</span></pre>
          </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="example">
              <a id="id2784444"></a>
              <p class="title">
                <b>Example&nbsp;6.25.&nbsp;Invalid Verbatim Tags</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="screen"><span class="database">- !&lt;<code class="filename">!</code>&gt; foo<br>- !&lt;<code class="literal">$:?</code>&gt; bar
</span></pre>
          </td>
                    <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>- Verbatim tags aren't resolved,
  so <code class="filename">!</code> is invalid.
- The <code class="literal">$:?</code> tag is neither a global
  URI tag nor a local tag starting
  with “<span class="quote">!</span>”.
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="variablelist">
              <dl>
                <dt>
                  <span class="term">Tag Shorthands</span>
                </dt>
                <dd>
                  <p>
                A <a id="id2784530" class="indexterm"></a><a id="tag/shorthand/"></a><em class="firstterm">tag
                shorthand</em> consists of a valid <a id="id2784547" class="indexterm"></a><a class="link" href="#tag/handle/">tag handle</a> followed by a non-empty
                suffix. The <a id="id2784562" class="indexterm"></a><a class="link" href="#tag/handle/">tag
                handle</a> must be associated with a <a id="id2784578" class="indexterm"></a><a class="link" href="#tag/prefix/">prefix</a>, either by
                default or by using a <a id="id2784593" class="indexterm"></a><a class="link" href="#directive/TAG/">“<span class="quote"><strong class="userinput"><code>TAG</code></strong></span>” directive</a>. The
                resulting <a id="id2784614" class="indexterm"></a><a class="link" href="#parse//">parsed</a> <a id="id2784626" class="indexterm"></a><a class="link" href="#tag//">tag</a> is the concatenation of the
                <a id="id2784639" class="indexterm"></a><a class="link" href="#tag/prefix/">prefix</a> and
                the suffix, and must either begin with <a id="id2784655" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20local%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a>
                (a <a id="id2784676" class="indexterm"></a><a class="link" href="#tag/local/">local
                tag</a>) or be a valid URI (a <a id="id2784692" class="indexterm"></a><a class="link" href="#tag/global/">global tag</a>).
              </p>
                  <p>
                The choice of <a id="id2784710" class="indexterm"></a><a class="link" href="#tag/handle/">tag
                handle</a> is a <a id="id2784725" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not
                be used to convey <a id="id2784742" class="indexterm"></a><a class="link" href="#content//">content</a>
                information. In particular, the <a id="id2784755" class="indexterm"></a><a class="link" href="#tag/handle/">tag handle</a> may be discarded once
                <a id="id2784770" class="indexterm"></a><a class="link" href="#parse//">parsing</a> is completed.
              </p>
                  <p>
                The suffix must not contain any <a id="id2784788" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%E2%80%A6%21%20named%20handle/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a> character. This would
                cause the tag shorthand to be interpreted as having a <a id="id2784812" class="indexterm"></a><a class="link" href="#tag/handle/named">named tag
                handle</a>. In addition, the suffix must not contain the
                <a id="id2784830" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</a>, <a id="id2784848" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</a>, <a id="id2784866" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</a>,
                <a id="id2784884" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</a> and <a id="id2784901" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> characters. These
                characters would cause ambiguity with <a id="id2784921" class="indexterm"></a><a class="link" href="#style/flow/collection">flow
                collection</a> structures. If the suffix needs to specify
                any of the above restricted characters, they must be <a id="id2784940" class="indexterm"></a><a class="link" href="#%%20escaping%20in%20URI//">escaped</a> using the
                <a id="id2784953" class="indexterm"></a><a class="link" href="#%%20escaping%20in%20URI//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a> character. This behavior is
                consistent with the URI character escaping rules (specifically,
                section 2.3 of <a class="ulink" href="http://www.ietf.org/rfc/rfc2396.txt" target="_top">RFC2396</a>).
              </p>
                </dd>
              </dl>
            </div>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[99]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-shorthand-tag"></a>c-ns-shorthand-tag</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-tag-handle">c-tag-handle</a>
              <a href="#ns-tag-char">ns-tag-char</a>+
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2785009"></a>
              <p class="title">
                <b>Example&nbsp;6.26.&nbsp;Tag Shorthands</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">%TAG !e! tag:example.com,2000:app/<br>---
- <code class="filename">!local</code> foo
- <code class="filename">!!str</code> bar
- <code class="filename">!e!tag%21</code> baz
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-ns-shorthand-tag">c-ns-shorthand-tag</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !&lt;!local&gt; "foo",
  !&lt;tag:yaml.org,2002:str&gt; "bar",
  !&lt;tag:example.com,2000:app/tag!&gt; "baz"
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="example">
              <a id="id2785092"></a>
              <p class="title">
                <b>Example&nbsp;6.27.&nbsp;Invalid Tag Shorthands</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="screen"><span class="database">%TAG !e! tag:example,2000:app/<br>---
- <code class="filename">!e!</code> foo
- <code class="literal">!h!</code>bar baz
</span></pre>
            </td>
                    <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>- The <code class="filename">!o!</code> handle has no suffix.
- The <code class="literal">!h!</code> handle wasn't declared.
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="variablelist">
              <dl>
                <dt>
                  <span class="term">Non-Specific Tags</span>
                </dt>
                <dd>
                  <p>
                If a <a id="id2785173" class="indexterm"></a><a class="link" href="#node//">node</a> has no tag
                property, it is assigned a <a id="id2785186" class="indexterm"></a><a class="link" href="#tag/non-specific/">non-specific tag</a> that needs
                to be <a id="id2785202" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a> to a <a id="id2785217" class="indexterm"></a><a class="link" href="#tag/specific/">specific</a> one. This
                <a id="id2785234" class="indexterm"></a><a class="link" href="#tag/non-specific/">non-specific
                tag</a> is <a id="id2785249" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20non-specific%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>”</a> for
                non-<a id="id2785271" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a> and <a id="id2785289" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”</a> for
                all other <a id="id2785308" class="indexterm"></a><a class="link" href="#node//">nodes</a>. This is the
                only case where the <a id="id2785321" class="indexterm"></a><a class="link" href="#style//">node
                style</a> has any effect on the <a id="id2785334" class="indexterm"></a><a class="link" href="#content//">content</a> information.
              </p>
                  <p>
                It is possible for the tag property to be explicitly set to the
                <a id="id2785352" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20non-specific%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>” non-specific tag</a>. By <a id="id2785375" class="indexterm"></a><a class="link" href="#tag/resolution/convention">convention</a>, this
                “<span class="quote">disables</span>” <a id="id2785397" class="indexterm"></a><a class="link" href="#tag/resolution/">tag resolution</a>, forcing the
                <a id="id2785412" class="indexterm"></a><a class="link" href="#node//">node</a> to be interpreted as
                “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>”,
                “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>”, or
                “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:str</code></strong></span>”, according to its
                <a id="id2785448" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
              </p>
                  <p>
                There is no way to explicitly specify the <a id="id2785465" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific</a>
                tag. This is intentional.
              </p>
                </dd>
              </dl>
            </div>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[100]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-non-specific-tag"></a>c-non-specific-tag</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-tag">“<span class="quote">!</span>”</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2785512"></a>
              <p class="title">
                <b>Example&nbsp;6.28.&nbsp;Non-Specific Tags</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"># Assuming conventional resolution:<br>- "12"
- 12
- <code class="filename">!</code> 12
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-non-specific-tag">c-non-specific-tag</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !&lt;tag:yaml.org,2002:str&gt; "12",
  !&lt;tag:yaml.org,2002:int&gt; "12",
  !&lt;tag:yaml.org,2002:str&gt; "12",
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2785586"></a>6.9.2.&nbsp;Node Anchors</h3>
                </div>
              </div>
            </div>
            <p>
          An anchor is denoted by the <a id="id2785595" class="indexterm"></a><a id="&amp; anchor//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>&amp;</code></strong></span>” indicator</em>. It marks a
          <a id="id2785614" class="indexterm"></a><a class="link" href="#node//">node</a> for future reference. An
          <a id="id2785628" class="indexterm"></a><a class="link" href="#alias//">alias node</a> can then be used to
          indicate additional inclusions of the anchored <a id="id2785642" class="indexterm"></a><a class="link" href="#node//">node</a>. An anchored <a id="id2785654" class="indexterm"></a><a class="link" href="#node//">node</a> need not be referenced by any <a id="id2785667" class="indexterm"></a><a class="link" href="#alias//">alias nodes</a>; in particular, it is valid for
          all <a id="id2785681" class="indexterm"></a><a class="link" href="#node//">nodes</a> to be anchored.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[101]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-anchor-property"></a>c-ns-anchor-property</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-anchor">“<span class="quote">&amp;</span>”</a>
              <a href="#ns-anchor-name">ns-anchor-name</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <p>
          Note that as a <a id="id2785725" class="indexterm"></a><a class="link" href="#serialization/detail/">serialization detail</a>, the anchor name is
          preserved in the <a id="id2785741" class="indexterm"></a><a class="link" href="#serialization//">serialization
          tree</a>. However, it is not reflected in the <a id="id2785756" class="indexterm"></a><a class="link" href="#representation//">representation</a> graph and must not
          be used to convey <a id="id2785769" class="indexterm"></a><a class="link" href="#content//">content</a>
          information. In particular, the YAML <a id="id2785782" class="indexterm"></a><a class="link" href="#processor//">processor</a> need not preserve the anchor
          name once the <a id="id2785796" class="indexterm"></a><a class="link" href="#representation//">representation</a> is <a id="id2785809" class="indexterm"></a><a class="link" href="#compose//">composed</a>.
        </p>
            <p>
          Anchor names must not contain the <a id="id2785826" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</a>, <a id="id2785844" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</a>, <a id="id2785862" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</a>, <a id="id2785880" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</a> and <a id="id2785897" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> characters. These
          characters would cause ambiguity with <a id="id2785916" class="indexterm"></a><a class="link" href="#style/flow/collection">flow collection</a>
          structures.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[102]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-anchor-char"></a>ns-anchor-char</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-char">ns-char</a>
              - <a href="#c-flow-indicator">c-flow-indicator</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[103]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-anchor-name"></a>ns-anchor-name</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-anchor-char">ns-anchor-char</a>+
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2785977"></a>
              <p class="title">
                <b>Example&nbsp;6.29.&nbsp;Node Anchors</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">First occurrence: <span class="honorific"><code class="filename">&amp;<code class="literal">anchor</code></code></span> Value<br>Second occurrence: *<code class="literal">anchor</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-ns-anchor-property">c-ns-anchor-property</a></code> <code class="literal"><a class="link" href="#ns-anchor-name">ns-anchor-name</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "First occurrence"
  : &amp;A !!str "Value",
  ? !!str "Second occurrence"
  : *A,
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Flow"></a>Chapter&nbsp;7.&nbsp;Flow Styles</h2>
            </div>
          </div>
        </div>
        <p>
      YAML’s <a id="id2786087" class="indexterm"></a><a id="style/flow/"></a><em class="firstterm">flow styles</em>
      can be thought of as the natural extension of JSON to cover <a id="id2786104" class="indexterm"></a><a class="link" href="#line%20folding//">folding</a> long content lines for
      readability, <a id="id2786118" class="indexterm"></a><a class="link" href="#tag//">tagging</a> nodes to control
      <a id="id2786130" class="indexterm"></a><a class="link" href="#construct//">construction</a> of <a id="id2786143" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data structures</a>, and
      using <a id="id2786157" class="indexterm"></a><a class="link" href="#anchor//">anchors</a> and <a id="id2786169" class="indexterm"></a><a class="link" href="#alias//">aliases</a> to reuse <a id="id2786182" class="indexterm"></a><a class="link" href="#construct//">constructed</a> object instances.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2786196"></a>7.1.&nbsp;Alias Nodes</h2>
              </div>
            </div>
          </div>
          <p>
        Subsequent occurrences of a previously <a id="id2786205" class="indexterm"></a><a class="link" href="#serialize//">serialized</a> node are <a id="id2786217" class="indexterm"></a><a class="link" href="#present//">presented</a> as <a id="id2786230" class="indexterm"></a><a id="alias//"></a><em class="firstterm">alias
        nodes</em>. The first occurrence of the <a id="id2786244" class="indexterm"></a><a class="link" href="#node//">node</a> must be marked by an <a id="id2786257" class="indexterm"></a><a class="link" href="#anchor//">anchor</a> to allow subsequent occurrences to be
        <a id="id2786270" class="indexterm"></a><a class="link" href="#present//">presented</a> as alias nodes.
      </p>
          <p>
        An alias node is denoted by the <a id="id2786287" class="indexterm"></a><a id="* alias//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>*</code></strong></span>” indicator</em>. The alias refers to the
        most recent preceding <a id="id2786308" class="indexterm"></a><a class="link" href="#node//">node</a> having the
        same <a id="id2786320" class="indexterm"></a><a class="link" href="#anchor//">anchor</a>. It is an error for an
        alias node to use an <a id="id2786334" class="indexterm"></a><a class="link" href="#anchor//">anchor</a> that
        does not previously occur in the <a id="id2786347" class="indexterm"></a><a class="link" href="#document//">document</a>. It is not an error to specify an
        <a id="id2786360" class="indexterm"></a><a class="link" href="#anchor//">anchor</a> that is not used by any
        alias node.
      </p>
          <p>
        Note that an alias node must not specify any <a id="id2786378" class="indexterm"></a><a class="link" href="#node/property/">properties</a> or <a id="id2786394" class="indexterm"></a><a class="link" href="#content//">content</a>, as these were already specified at the first
        occurrence of the <a id="id2786408" class="indexterm"></a><a class="link" href="#node//">node</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[104]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-ns-alias-node"></a>c-ns-alias-node</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#c-alias">“<span class="quote">*</span>”</a>
            <a href="#ns-anchor-name">ns-anchor-name</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2786448"></a>
            <p class="title">
              <b>Example&nbsp;7.1.&nbsp;Alias Nodes</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">First occurrence: &amp;<code class="literal">anchor</code> Foo<br>Second occurrence: <span class="honorific"><code class="filename">*<code class="literal">anchor</code></code></span>
Override anchor: &amp;<code class="literal">anchor</code> Bar
Reuse anchor: <span class="honorific"><code class="filename">*<code class="literal">anchor</code></code></span>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-ns-alias-node">c-ns-alias-node</a></code> <code class="literal"><a class="link" href="#ns-anchor-name">ns-anchor-name</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "First occurrence"
  : &amp;A !!str "Foo",
  ? !!str "Override anchor"
  : &amp;B !!str "Bar",
  ? !!str "Second occurrence"
  : *A,
  ? !!str "Reuse anchor"
  : *B,
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2786563"></a>7.2.&nbsp;Empty Nodes</h2>
              </div>
            </div>
          </div>
          <p>
        YAML allows the <a id="id2786571" class="indexterm"></a><a class="link" href="#content//">node content</a> to be
        omitted in many cases. <a id="id2786585" class="indexterm"></a><a class="link" href="#node//">Nodes</a> with
        empty <a id="id2786598" class="indexterm"></a><a class="link" href="#content//">content</a> are interpreted as
        if they were <a id="id2786611" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a> with an empty value. Such
        <a id="id2786629" class="indexterm"></a><a class="link" href="#node//">nodes</a> are commonly resolved to a
        <a id="id2786642" class="indexterm"></a><a class="link" href="#tag/repository/null">“<span class="quote"><strong class="userinput"><code>null</code></strong></span>”</a> value.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[105]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="e-scalar"></a>e-scalar</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            /* Empty */
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <p>
        In the examples, empty <a id="id2786684" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> are
        sometimes displayed as the glyph “<span class="quote"><strong class="userinput"><code>°</code></strong></span>” for clarity.
        Note that this glyph corresponds to a position in the characters
        <a id="id2786706" class="indexterm"></a><a class="link" href="#stream//">stream</a> rather than to an actual
        character.
      </p>
          <div class="example">
            <a id="id2786720"></a>
            <p class="title">
              <b>Example&nbsp;7.2.&nbsp;Empty Content</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">{<br>  foo : !!str<code class="filename">°</code>,
  !!str<code class="filename">°</code> : bar,
}
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#e-scalar">e-scalar</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "foo" : !!str "",
  ? !!str ""    : !!str "bar",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        Both the <a id="id2786797" class="indexterm"></a><a class="link" href="#node/property/">node’s
        properties</a> and <a id="id2786814" class="indexterm"></a><a class="link" href="#content//">node
        content</a> are optional. This allows for a <a id="id2786827" class="indexterm"></a><a id="node/completely empty/"></a><em class="firstterm">completely empty
        node</em>. Completely empty nodes are only valid when following
        some explicit indication for their existence.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[106]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="e-node"></a>e-node</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#e-scalar">e-scalar</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2786868"></a>
            <p class="title">
              <b>Example&nbsp;7.3.&nbsp;Completely Empty Flow Nodes</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">{<br>  ? foo :<code class="filename">°</code>,
  <code class="filename">°</code>: bar,
}
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#e-node">e-node</a></code>
</pre>
        </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "foo" : !!null "",
  ? !!null ""   : !!str "bar",
}
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2786942"></a>7.3.&nbsp;Flow Scalar Styles</h2>
              </div>
            </div>
          </div>
          <p>
        YAML provides three <a id="id2786951" class="indexterm"></a><a id="style/flow/scalar"></a><em class="firstterm">flow scalar styles</em>: <a id="id2786969" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted</a>, <a id="id2786988" class="indexterm"></a><a class="link" href="#style/flow/single-quoted">single-quoted</a> and <a id="id2787006" class="indexterm"></a><a class="link" href="#style/flow/plain">plain</a>
        (unquoted). Each provides a different trade-off between readability and
        expressive power.
      </p>
          <p>
        The <a id="id2787029" class="indexterm"></a><a class="link" href="#style/scalar/">scalar style</a>
        is a <a id="id2787045" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation
        detail</a> and must not be used to convey <a id="id2787061" class="indexterm"></a><a class="link" href="#content//">content</a> information, with the exception
        that <a id="id2787074" class="indexterm"></a><a class="link" href="#style/flow/plain">plain
        scalars</a> are distinguished for the purpose of <a id="id2787093" class="indexterm"></a><a class="link" href="#tag/resolution/">tag resolution</a>.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2787109"></a>7.3.1.&nbsp;Double-Quoted Style</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2787117" class="indexterm"></a><a id="style/flow/double-quoted"></a><em class="firstterm">double-quoted style</em> is specified
          by surrounding <a id="id2787138" class="indexterm"></a><a id="&quot; double-quoted style//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>"</code></strong></span>” indicators</em>. This is the only
          <a id="id2787159" class="indexterm"></a><a class="link" href="#style//">style</a> capable of expressing
          arbitrary strings, by using <a id="id2787172" class="indexterm"></a><a class="link" href="#%5C%20escaping%20in%20double-quoted%20scalars//">“<span class="quote"><strong class="userinput"><code>\</code></strong></span>”</a> <a id="id2787192" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape
          sequences</a>. This comes at the cost of having to escape the
          <a id="id2787210" class="indexterm"></a><a class="link" href="#%5C%20escaping%20in%20double-quoted%20scalars//">“<span class="quote"><strong class="userinput"><code>\</code></strong></span>”</a> and “<span class="quote"><strong class="userinput"><code>"</code></strong></span>”
          characters.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[107]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-double-char"></a>nb-double-char</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-ns-esc-char">c-ns-esc-char</a>
              | ( <a href="#nb-json">nb-json</a>
              - <a href="#c-escape">“<span class="quote">\</span>”</a>
              - <a href="#c-double-quote">“<span class="quote">"</span>”</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[108]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-double-char"></a>ns-double-char</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#nb-double-char">nb-double-char</a>
              - <a href="#s-white">s-white</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <p>
          Double-quoted scalars are restricted to a single line when contained
          inside an <a id="id2787301" class="indexterm"></a><a class="link" href="#key/implicit/">implicit
          key</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[109]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-double-quoted(n,c)"></a>c-double-quoted(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-double-quote">“<span class="quote">"</span>”</a>
              <a href="#nb-double-text%28n,c%29">nb-double-text(n,c)</a>
              <a href="#c-double-quote">“<span class="quote">"</span>”</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[110]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-double-text(n,c)"></a>nb-double-text(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <code class="varname">c</code> = flow-out&nbsp; ⇒
              <a href="#nb-double-multi-line%28n%29">nb-double-multi-line(n)</a><br>
              <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒
              <a href="#nb-double-multi-line%28n%29">nb-double-multi-line(n)</a><br>
              <code class="varname">c</code> = block-key ⇒
              <a href="#nb-double-one-line">nb-double-one-line</a><br>
              <code class="varname">c</code> = flow-key&nbsp; ⇒
              <a href="#nb-double-one-line">nb-double-one-line</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[111]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-double-one-line"></a>nb-double-one-line</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#nb-double-char">nb-double-char</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2787420"></a>
              <p class="title">
                <b>Example&nbsp;7.4.&nbsp;Double Quoted Implicit Keys</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><span class="honorific"><code class="literal">"<code class="filename">implicit block key</code>"</code></span> : [<br>  <span class="honorific"><code class="literal">"<code class="filename">implicit flow key</code>"</code></span> : value,
 ]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#nb-double-one-line">nb-double-one-line</a></code>
  <code class="literal"><a class="link" href="#c-double-quoted%28n,c%29">c-double-quoted(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "implicit block key"
  : !!seq [
    !!map {
      ? !!str "implicit flow key"
      : !!str "value",
    }
  ]
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          In a multi-line double-quoted scalar, <a id="id2787523" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> are are subject to <a id="id2787537" class="indexterm"></a><a class="link" href="#line%20folding/flow/">flow line folding</a>,
          which discards any trailing <a id="id2787553" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters. It is also
          possible to <a id="id2787570" class="indexterm"></a><a id="escaping/non-content line break/"></a><em class="firstterm">escape</em> the <a id="id2787588" class="indexterm"></a><a class="link" href="#line%20break//">line
          break</a> character. In this case, the <a id="id2787601" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> is excluded from the <a id="id2787615" class="indexterm"></a><a class="link" href="#content//">content</a>, and the trailing <a id="id2787627" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters
          are preserved. Combined with the ability to <a id="id2787644" class="indexterm"></a><a class="link" href="#escaping/in%20double-quoted%20scalars/">escape</a> <a id="id2787660" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters, this allows
          double-quoted lines to be broken at arbitrary positions.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[112]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-double-escaped(n)"></a>s-double-escaped(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-white">s-white</a>*
              <a href="#c-escape">“<span class="quote">\</span>”</a>
              <a href="#b-non-content">b-non-content</a><br>
              <a href="#l-empty%28n,c%29">l-empty(n,flow-in)</a>*
              <a href="#s-flow-line-prefix%28n%29">s-flow-line-prefix(n)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[113]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-double-break(n)"></a>s-double-break(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-double-escaped%28n%29">s-double-escaped(n)</a>
              | <a href="#s-flow-folded%28n%29">s-flow-folded(n)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2787745"></a>
              <p class="title">
                <b>Example&nbsp;7.5.&nbsp;Double Quoted Line Breaks</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">"folded<code class="filename">·↓</code><br>to a space,<code class="filename">→↓
·↓</code>
to a line feed, or<code class="literal">·→\↓
·</code>\·→non-content"
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "folded to a space,\n\
      to a line feed, \
      or \t \tnon-content"
</span></pre>
            </td>
                  </tr>
                </tbody></table>
                <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-flow-folded%28n%29">s-flow-folded(n)</a></code> <code class="literal"><a class="link" href="#s-double-escaped%28n%29">s-double-escaped(n)</a></code>
</pre>
              </div>
            </div>
            <br class="example-break">
            <p>
          All leading and trailing <a id="id2787839" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters are excluded from
          the <a id="id2787856" class="indexterm"></a><a class="link" href="#content//">content</a>. Each continuation
          line must therefore contain at least one non-<a id="id2787869" class="indexterm"></a><a class="link" href="#space/white/">space</a> character. Empty lines, if any, are
          consumed as part of the <a id="id2787886" class="indexterm"></a><a class="link" href="#line%20folding//">line
          folding</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[114]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-ns-double-in-line"></a>nb-ns-double-in-line</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#s-white">s-white</a>*
              <a href="#ns-double-char">ns-double-char</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[115]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-double-next-line(n)"></a>s-double-next-line(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-double-break%28n%29">s-double-break(n)</a><br>
              ( <a href="#ns-double-char">ns-double-char</a>
              <a href="#nb-ns-double-in-line">nb-ns-double-in-line</a><br>
              &nbsp;&nbsp;( <a href="#s-double-next-line%28n%29">s-double-next-line(n)</a>
              | <a href="#s-white">s-white</a>* ) )?
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[116]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-double-multi-line(n)"></a>nb-double-multi-line(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#nb-ns-double-in-line">nb-ns-double-in-line</a><br>
              ( <a href="#s-double-next-line%28n%29">s-double-next-line(n)</a>
              | <a href="#s-white">s-white</a>* )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2787994"></a>
              <p class="title">
                <b>Example&nbsp;7.6.&nbsp;Double Quoted Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">"<code class="filename">·1st non-empty</code><span class="honorific"><code class="literal">↓<br>↓
·<code class="filename">2nd non-empty</code></code></span><span class="honorific"><code class="literal">·
→<code class="filename">3rd non-empty</code></code></span>·"
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str " 1st non-empty\n\
      2nd non-empty \
      3rd non-empty "
</span></pre>
            </td>
                  </tr>
                </tbody></table>
                <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#nb-ns-double-in-line">nb-ns-double-in-line</a></code> <code class="literal"><a class="link" href="#s-double-next-line%28n%29">s-double-next-line(n)</a></code>
</pre>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2788097"></a>7.3.2.&nbsp;Single-Quoted Style</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2788105" class="indexterm"></a><a id="style/flow/single-quoted"></a><em class="firstterm">single-quoted style</em> is specified
          by surrounding <a id="id2788126" class="indexterm"></a><a id="' single-quoted style//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>'</code></strong></span>” indicators</em>. Therefore, within a
          single-quoted scalar, such characters need to be repeated. This is
          the only form of <a id="id2788148" class="indexterm"></a><a id="escaping/in single-quoted scalars/"></a><em class="firstterm">escaping</em> performed in single-quoted
          scalars. In particular, the “<span class="quote"><strong class="userinput"><code>\</code></strong></span>” and “<span class="quote"><strong class="userinput"><code>"</code></strong></span>”
          characters may be freely used. This restricts single-quoted scalars
          to <a id="id2788182" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a>
          characters. In addition, it is only possible to break a long
          single-quoted line where a <a id="id2788198" class="indexterm"></a><a class="link" href="#space//">space</a>
          character is surrounded by non-<a id="id2788211" class="indexterm"></a><a class="link" href="#space/white/">spaces</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[117]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-quoted-quote"></a>c-quoted-quote</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-single-quote">“<span class="quote">'</span>”</a>
              <a href="#c-single-quote">“<span class="quote">'</span>”</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[118]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-single-char"></a>nb-single-char</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-quoted-quote">c-quoted-quote</a>
              | ( <a href="#nb-json">nb-json</a>
              - <a href="#c-single-quote">“<span class="quote">'</span>”</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[119]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-single-char"></a>ns-single-char</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#nb-single-char">nb-single-char</a>
              - <a href="#s-white">s-white</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2788307"></a>
              <p class="title">
                <b>Example&nbsp;7.7.&nbsp;Single Quoted Characters</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"> 'here<code class="filename">''</code>s to "quotes"'<br></span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-quoted-quote">c-quoted-quote</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "here's to \"quotes\""
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          Single-quoted scalars are restricted to a single line when contained
          inside a <a id="id2788377" class="indexterm"></a><a class="link" href="#key/implicit/">implicit
          key</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[120]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-single-quoted(n,c)"></a>c-single-quoted(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-single-quote">“<span class="quote">'</span>”</a>
              <a href="#nb-single-text%28n,c%29">nb-single-text(n,c)</a>
              <a href="#c-single-quote">“<span class="quote">'</span>”</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[121]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-single-text(n,c)"></a>nb-single-text(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <code class="varname">c</code> = flow-out&nbsp; ⇒
              <a href="#nb-single-multi-line%28n%29">nb-single-multi-line(n)</a><br>
              <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒
              <a href="#nb-single-multi-line%28n%29">nb-single-multi-line(n)</a><br>
              <code class="varname">c</code> = block-key ⇒
              <a href="#nb-single-one-line">nb-single-one-line</a><br>
              <code class="varname">c</code> = flow-key&nbsp; ⇒
              <a href="#nb-single-one-line">nb-single-one-line</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[122]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-single-one-line"></a>nb-single-one-line</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#nb-single-char">nb-single-char</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2788496"></a>
              <p class="title">
                <b>Example&nbsp;7.8.&nbsp;Single Quoted Implicit Keys</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><span class="honorific"><code class="literal">'<code class="filename">implicit block key</code>'</code></span> : [<br>  <span class="honorific"><code class="literal">'<code class="filename">implicit flow key</code>'</code></span> : value,
 ]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#nb-single-one-line">nb-single-one-line</a></code>
  <code class="literal"><a class="link" href="#c-single-quoted%28n,c%29">c-single-quoted(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "implicit block key"
  : !!seq [
    !!map {
      ? !!str "implicit flow key"
      : !!str "value",
    }
  ]
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          All leading and trailing <a id="id2788601" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters are excluded from
          the <a id="id2788618" class="indexterm"></a><a class="link" href="#content//">content</a>. Each continuation
          line must therefore contain at least one non-<a id="id2788631" class="indexterm"></a><a class="link" href="#space/white/">space</a> character. Empty lines, if any, are
          consumed as part of the <a id="id2788648" class="indexterm"></a><a class="link" href="#line%20folding//">line
          folding</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[123]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-ns-single-in-line"></a>nb-ns-single-in-line</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#s-white">s-white</a>*
              <a href="#ns-single-char">ns-single-char</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[124]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-single-next-line(n)"></a>s-single-next-line(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-flow-folded%28n%29">s-flow-folded(n)</a><br>
              ( <a href="#ns-single-char">ns-single-char</a>
              <a href="#nb-ns-single-in-line">nb-ns-single-in-line</a><br>
              &nbsp;&nbsp;( <a href="#s-single-next-line%28n%29">s-single-next-line(n)</a> |
              <a href="#s-white">s-white</a>* ) )?
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[125]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-single-multi-line(n)"></a>nb-single-multi-line(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#nb-ns-single-in-line">nb-ns-single-in-line</a><br>
              ( <a href="#s-single-next-line%28n%29">s-single-next-line(n)</a>
              | <a href="#s-white">s-white</a>* )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2788756"></a>
              <p class="title">
                <b>Example&nbsp;7.9.&nbsp;Single Quoted Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">'<code class="filename">·1st non-empty</code><span class="honorific"><code class="literal">↓<br>↓
·<code class="filename">2nd non-empty</code></code></span><span class="honorific"><code class="literal">·
→<code class="filename">3rd non-empty</code></code></span>·'
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str " 1st non-empty\n\
      2nd non-empty \
      3rd non-empty "
</span></pre>
            </td>
                  </tr>
                </tbody></table>
                <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#nb-ns-single-in-line">nb-ns-single-in-line(n)</a></code> <code class="literal"><a class="link" href="#s-single-next-line%28n%29">s-single-next-line(n)</a></code>
</pre>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2788859"></a>7.3.3.&nbsp;Plain Style</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2788867" class="indexterm"></a><a id="style/flow/plain"></a><em class="firstterm">plain</em> (unquoted) style has no identifying
          <a id="id2788887" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> and provides no
          form of escaping. It is therefore the most readable, most limited and
          most <a id="id2788901" class="indexterm"></a><a class="link" href="#context//">context</a> sensitive <a id="id2788914" class="indexterm"></a><a class="link" href="#style//">style</a>. In addition to a restricted
          character set, a plain scalar must not be empty, or contain leading
          or trailing <a id="id2788929" class="indexterm"></a><a class="link" href="#space/white/">white
          space</a> characters. It is only possible to break a long plain
          line where a <a id="id2788946" class="indexterm"></a><a class="link" href="#space//">space</a> character is
          surrounded by non-<a id="id2788959" class="indexterm"></a><a class="link" href="#space/white/">spaces</a>.
        </p>
            <p>
          Plain scalars must not begin with most <a id="id2788979" class="indexterm"></a><a class="link" href="#indicator//">indicators</a>, as this would cause
          ambiguity with other YAML constructs. However, the <a id="id2788992" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:</code></strong></span>”</a>, <a id="id2789010" class="indexterm"></a><a class="link" href="#?%20mapping%20key//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”</a> and <a id="id2789027" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>”</a>
          <a id="id2789044" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> may be used as the
          first character if followed by a non-<a id="id2789058" class="indexterm"></a><a class="link" href="#space/white/">space</a> “<span class="quote">safe</span>” character, as
          this causes no ambiguity.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[126]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-first(c)"></a>ns-plain-first(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;( <a href="#ns-char">ns-char</a>
                - <a href="#c-indicator">c-indicator</a> )<br>
              | ( ( <a href="#c-mapping-key">“<span class="quote">?</span>”</a>
              | <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
              | <a href="#c-sequence-entry">“<span class="quote">-</span>”</a> )<br>
              &nbsp;&nbsp;&nbsp;&nbsp;/* Followed by an
                  <a href="#ns-plain-safe%28c%29">ns-plain-safe(c)</a>) */ )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <p>
          Plain scalars must never contain the <a id="id2789140" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:&nbsp;</code></strong></span>”</a> and <a id="id2789158" class="indexterm"></a><a class="link" href="##%20comment//">“<span class="quote"><strong class="userinput"><code>&nbsp;#</code></strong></span>”</a> character combinations.
          Such combinations would cause ambiguity with <a id="id2789176" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> <a id="id2789188" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pairs</a> and <a id="id2789202" class="indexterm"></a><a class="link" href="#comment//">comments</a>. In addition, inside <a id="id2789215" class="indexterm"></a><a class="link" href="#style/flow/collection">flow
          collections</a>, or when used as <a id="id2789233" class="indexterm"></a><a class="link" href="#key/implicit/">implicit keys</a>, plain scalars must not
          contain the <a id="id2789249" class="indexterm"></a><a class="link" href="#[%20start%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</a>, <a id="id2789268" class="indexterm"></a><a class="link" href="#]%20end%20flow%20sequence//">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</a>, <a id="id2789285" class="indexterm"></a><a class="link" href="#%7B%20start%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</a>, <a id="id2789303" class="indexterm"></a><a class="link" href="#%7D%20end%20flow%20mapping//">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</a> and <a id="id2789320" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> characters. These
          characters would cause ambiguity with <a id="id2789339" class="indexterm"></a><a class="link" href="#style/flow/collection">flow collection</a>
          structures.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[127]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-safe(c)"></a>ns-plain-safe(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <code class="varname">c</code> = flow-out&nbsp; ⇒ <a href="#ns-plain-safe-out">ns-plain-safe-out</a><br>
              <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒ <a href="#ns-plain-safe-in">ns-plain-safe-in</a><br>
              <code class="varname">c</code> = block-key ⇒ <a href="#ns-plain-safe-out">ns-plain-safe-out</a><br>
              <code class="varname">c</code> = flow-key&nbsp; ⇒ <a href="#ns-plain-safe-in">ns-plain-safe-in</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[128]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-safe-out"></a>ns-plain-safe-out</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-char">ns-char</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[129]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-safe-in"></a>ns-plain-safe-in</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-char">ns-char</a>
              - <a href="#c-flow-indicator">c-flow-indicator</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[130]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-char(c)"></a>ns-plain-char(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;( <a href="#ns-plain-safe%28c%29">ns-plain-safe(c)</a>
              - <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
              - <a href="#c-comment">“<span class="quote">#</span>”</a> )<br>
              | ( /* An <a href="#ns-char">ns-char</a> preceding */ <a href="#c-comment">“<span class="quote">#</span>”</a> )<br>
              | ( <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
                  /* Followed by an
                  <a href="#ns-plain-safe%28c%29">ns-plain-safe(c)</a> */ )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2789510"></a>
              <p class="title">
                <b>Example&nbsp;7.10.&nbsp;Plain Characters</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"># Outside flow collection:<br>- <code class="filename">:</code><code class="literal">:</code>vector
- "<span class="property">:</span> - ()"
- Up<code class="literal">,</code> up, and away!
- <code class="filename">-</code>123
- http<code class="literal">:</code>//example.com/foo<code class="literal">#</code>bar
# Inside flow collection:
- [ <code class="filename">:</code><code class="literal">:</code>vector,
  "<span class="property">:</span> - ()",
  "Up<code class="constant">,</code> up and away!",
  <code class="filename">-</code>123,
  http<code class="literal">:</code>//example.com/foo<code class="literal">#</code>bar ]
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!str "::vector",
  !!str ": - ()",
  !!str "Up, up, and away!",
  !!int "-123",
  !!str "http://example.com/foo#bar",
  !!seq [
    !!str "::vector",
    !!str ": - ()",
    !!str "Up, up, and away!",
    !!int "-123",
    !!str "http://example.com/foo#bar",
  ],
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
                <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-plain-first%28c%29">ns-plain-first(c)</a></code> <span class="property">Not ns-plain-first(c)</span> <code class="literal"><a class="link" href="#ns-plain-char%28c%29">ns-plain-char(c)</a></code> <code class="constant">Not ns-plain-char(c)</code>
</pre>
              </div>
            </div>
            <br class="example-break">
            <p>
          Plain scalars are further restricted to a single line when contained
          inside an <a id="id2789678" class="indexterm"></a><a class="link" href="#key/implicit/">implicit
          key</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[131]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain(n,c)"></a>ns-plain(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <code class="varname">c</code> = flow-out&nbsp; ⇒
                <a href="#ns-plain-multi-line%28n,c%29">ns-plain-multi-line(n,c)</a><br>
              <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒
                <a href="#ns-plain-multi-line%28n,c%29">ns-plain-multi-line(n,c)</a><br>
              <code class="varname">c</code> = block-key ⇒
                <a href="#ns-plain-one-line%28c%29">ns-plain-one-line(c)</a><br>
              <code class="varname">c</code> = flow-key&nbsp; ⇒
                <a href="#ns-plain-one-line%28c%29">ns-plain-one-line(c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[132]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="nb-ns-plain-in-line(c)"></a>nb-ns-plain-in-line(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#s-white">s-white</a>*
              <a href="#ns-plain-char%28c%29">ns-plain-char(c)</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[133]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-one-line(c)"></a>ns-plain-one-line(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-plain-first%28c%29">ns-plain-first(c)</a>
              <a href="#nb-ns-plain-in-line%28c%29">nb-ns-plain-in-line(c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2789794"></a>
              <p class="title">
                <b>Example&nbsp;7.11.&nbsp;Plain Implicit Keys</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">implicit block key</code> : [<br>  <code class="filename">implicit flow key</code> : value,
 ]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-plain-one-line%28c%29">ns-plain-one-line(c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "implicit block key"
  : !!seq [
    !!map {
      ? !!str "implicit flow key"
      : !!str "value",
    }
  ]
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          All leading and trailing <a id="id2789872" class="indexterm"></a><a class="link" href="#space/white/">white space</a> characters are excluded from
          the <a id="id2789888" class="indexterm"></a><a class="link" href="#content//">content</a>. Each continuation
          line must therefore contain at least one non-<a id="id2789902" class="indexterm"></a><a class="link" href="#space/white/">space</a> character. Empty lines, if any, are
          consumed as part of the <a id="id2789918" class="indexterm"></a><a class="link" href="#line%20folding//">line
          folding</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[134]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-ns-plain-next-line(n,c)"></a>s-ns-plain-next-line(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-flow-folded%28n%29">s-flow-folded(n)</a><br>
              <a href="#ns-plain-char%28c%29">ns-plain-char(c)</a>
              <a href="#nb-ns-plain-in-line%28c%29">nb-ns-plain-in-line(c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[135]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-plain-multi-line(n,c)"></a>ns-plain-multi-line(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-plain-one-line%28c%29">ns-plain-one-line(c)</a><br>
              <a href="#s-ns-plain-next-line%28n,c%29">s-ns-plain-next-line(n,c)</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2789986"></a>
              <p class="title">
                <b>Example&nbsp;7.12.&nbsp;Plain Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">1st non-empty</code><span class="honorific"><code class="literal">↓<br>↓
·<code class="filename">2nd non-empty</code></code></span><span class="honorific"><code class="literal">·
→<code class="filename">3rd non-empty</code></code></span>
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "1st non-empty\n\
      2nd non-empty \
      3rd non-empty"
</span></pre>
            </td>
                  </tr>
                </tbody></table>
                <pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#nb-ns-plain-in-line%28c%29">nb-ns-plain-in-line(c)</a></code> <code class="literal"><a class="link" href="#s-ns-plain-next-line%28n,c%29">s-ns-plain-next-line(n,c)</a></code>
</pre>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2790088"></a>7.4.&nbsp;Flow Collection Styles</h2>
              </div>
            </div>
          </div>
          <p>
        A <a id="id2790097" class="indexterm"></a><a id="style/flow/collection"></a><em class="firstterm">flow
        collection</em> may be nested within a <a id="id2790116" class="indexterm"></a><a class="link" href="#style/block/collection">block collection</a>
        (<a id="id2790135" class="indexterm"></a><a class="link" href="#context/flow-out/"><strong class="userinput"><code>flow-out</code></strong>
        context</a>), nested within another flow collection (<a id="id2790156" class="indexterm"></a><a class="link" href="#context/flow-in/"><strong class="userinput"><code>flow-in</code></strong>
        context</a>), or be a part of an <a id="id2790178" class="indexterm"></a><a class="link" href="#key/implicit/">implicit key</a> (<a id="id2790192" class="indexterm"></a><a class="link" href="#context/flow-key/"><strong class="userinput"><code>flow-key</code></strong> context</a>
        or <a id="id2790214" class="indexterm"></a><a class="link" href="#context/block-key/"><strong class="userinput"><code>block-key</code></strong>
        context</a>). Flow collection entries are terminated by the
        <a id="id2790235" class="indexterm"></a><a id=", end flow entry//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”
        indicator</em>. The final “<span class="quote"><strong class="userinput"><code>,</code></strong></span>” may be omitted. This
        does not cause ambiguity because flow collection entries can never be
        <a id="id2790263" class="indexterm"></a><a class="link" href="#node/completely%20empty/">completely
        empty</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[136]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="in-flow(c)"></a>in-flow(c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <code class="varname">c</code> = flow-out&nbsp; ⇒ flow-in<br>
            <code class="varname">c</code> = flow-in&nbsp;&nbsp; ⇒ flow-in<br>
            <code class="varname">c</code> = block-key ⇒ flow-key<br>
            <code class="varname">c</code> = flow-key&nbsp; ⇒ flow-key
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2790320"></a>7.4.1.&nbsp;Flow Sequences</h3>
                </div>
              </div>
            </div>
            <p>
          <a id="id2790328" class="indexterm"></a><a id="style/flow/sequence"></a><em class="firstterm">Flow
          sequence content</em> is denoted by surrounding <a id="id2790348" class="indexterm"></a><a id="[ start flow sequence//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>[</code></strong></span>”</em> and
          <a id="id2790367" class="indexterm"></a><a id="] end flow sequence//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>]</code></strong></span>”</em>
          characters.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[137]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-flow-sequence(n,c)"></a>c-flow-sequence(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-sequence-start">“<span class="quote">[</span>”</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              <a href="#ns-s-flow-seq-entries%28n,c%29">ns-s-flow-seq-entries(n,</a><a href="#in-flow%28c%29">in-flow(c)</a><a href="#ns-s-flow-seq-entries%28n,c%29">)</a>?
              <a href="#c-sequence-end">“<span class="quote">]</span>”</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <p>
          Sequence entries are separated by a <a id="id2790441" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> character.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[138]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-s-flow-seq-entries(n,c)"></a>ns-s-flow-seq-entries(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-flow-seq-entry%28n,c%29">ns-flow-seq-entry(n,c)</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              ( <a href="#c-collect-entry">“<span class="quote">,</span>”</a>
                <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              &nbsp;&nbsp;<a href="#ns-s-flow-seq-entries%28n,c%29">ns-s-flow-seq-entries(n,c)</a>? )?
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2790506"></a>
              <p class="title">
                <b>Example&nbsp;7.13.&nbsp;Flow Sequence</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">- <code class="filename">[</code> <code class="literal">one</code>, <code class="literal">two</code>, <code class="filename">]</code><br>- <code class="filename">[</code><code class="literal">three</code> ,<code class="literal">four</code><code class="filename">]</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-sequence-start">c-sequence-start</a></code> <code class="filename"><a class="link" href="#c-sequence-end">c-sequence-end</a></code>
  <code class="literal"><a class="link" href="#ns-flow-seq-entry%28n,c%29">ns-flow-seq-entry(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!seq [
    !!str "one",
    !!str "two",
  ],
  !!seq [
    !!str "three",
    !!str "four",
  ],
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          Any <a id="id2790634" class="indexterm"></a><a class="link" href="#style/flow/">flow node</a> may
          be used as a flow sequence entry. In addition, YAML provides a
          <a id="id2790651" class="indexterm"></a><a class="link" href="#style/single%20key:value%20pair%20mapping/">compact notation</a> for the case where a flow
          sequence entry is a <a id="id2790670" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> with
          a <a id="id2790682" class="indexterm"></a><a class="link" href="#style/single%20key:value%20pair%20mapping/">single key:&nbsp;value pair</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[139]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-seq-entry(n,c)"></a>ns-flow-seq-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-flow-pair%28n,c%29">ns-flow-pair(n,c)</a>
              | <a href="#ns-flow-node%28n,c%29">ns-flow-node(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2790726"></a>
              <p class="title">
                <b>Example&nbsp;7.14.&nbsp;Flow Sequence Entries</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">[<br><code class="filename">"double
 quoted"</code>, <code class="filename">'single
           quoted'</code>,
<code class="filename">plain
 text</code>, <code class="filename">[ nested ]</code>,
<code class="literal">single: pair</code>,
]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-flow-node%28n,c%29">ns-flow-node(n,c)</a></code> <code class="literal"><a class="link" href="#ns-flow-pair%28n,c%29">ns-flow-pair(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!str "double quoted",
  !!str "single quoted",
  !!str "plain text",
  !!seq [
    !!str "nested",
  ],
  !!map {
    ? !!str "single"
    : !!str "pair",
  },
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2790832"></a>7.4.2.&nbsp;Flow Mappings</h3>
                </div>
              </div>
            </div>
            <p>
          <a id="id2790840" class="indexterm"></a><a id="style/flow/mapping"></a><em class="firstterm">Flow
          mappings</em> are denoted by surrounding <a id="id2790860" class="indexterm"></a><a id="{ start flow mapping//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>{</code></strong></span>”</em> and <a id="id2790879" class="indexterm"></a><a id="} end flow mapping//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>}</code></strong></span>”</em> characters.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[140]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-flow-mapping(n,c)"></a>c-flow-mapping(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-mapping-start">“<span class="quote">{</span>”</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              <a href="#ns-s-flow-map-entries%28n,c%29">ns-s-flow-map-entries(n,</a><a href="#in-flow%28c%29">in-flow(c)</a><a href="#ns-s-flow-map-entries%28n,c%29">)</a>?
              <a href="#c-mapping-end">“<span class="quote">}</span>”</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <p>
          Mapping entries are separated by a <a id="id2790953" class="indexterm"></a><a class="link" href="#,%20end%20flow%20entry//">“<span class="quote"><strong class="userinput"><code>,</code></strong></span>”</a> character.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[141]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-s-flow-map-entries(n,c)"></a>ns-s-flow-map-entries(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-flow-map-entry%28n,c%29">ns-flow-map-entry(n,c)</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
                ( <a href="#c-collect-entry">“<span class="quote">,</span>”</a>
                  <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
                &nbsp;&nbsp;<a href="#ns-s-flow-map-entries%28n,c%29">ns-s-flow-map-entries(n,c)</a>? )?
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2791018"></a>
              <p class="title">
                <b>Example&nbsp;7.15.&nbsp;Flow Mappings</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">- <code class="filename">{</code> <code class="literal">one : two</code> , <code class="literal">three: four</code> , <code class="filename">}</code><br>- <code class="filename">{</code><code class="literal">five: six</code>,<code class="literal">seven : eight</code><code class="filename">}</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-mapping-start">c-mapping-start</a></code> <code class="filename"><a class="link" href="#c-mapping-end">c-mapping-end</a></code>
  <code class="literal"><a class="link" href="#ns-flow-map-entry%28n,c%29">ns-flow-map-entry(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!map {
    ? !!str "one"   : !!str "two",
    ? !!str "three" : !!str "four",
  },
  !!map {
    ? !!str "five"  : !!str "six",
    ? !!str "seven" : !!str "eight",
  },
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          If the optional <a id="id2791147" class="indexterm"></a><a id="? mapping key//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”
          mapping key indicator</em> is specified, the rest of the entry
          may be <a id="id2791169" class="indexterm"></a><a class="link" href="#node/completely%20empty/">completely empty</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[142]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-map-entry(n,c)"></a>ns-flow-map-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;(
              <a href="#c-mapping-key">“<span class="quote">?</span>”</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ns-flow-map-explicit-entry%28n,c%29">ns-flow-map-explicit-entry(n,c)</a> )<br>
              | <a href="#ns-flow-map-implicit-entry%28n,c%29">ns-flow-map-implicit-entry(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[143]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-map-explicit-entry(n,c)"></a>ns-flow-map-explicit-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;<a href="#ns-flow-map-implicit-entry%28n,c%29">ns-flow-map-implicit-entry(n,c)</a><br>
              | ( <a href="#e-node">e-node</a> /* Key */<br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#e-node">e-node</a> /* Value */ )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2791260"></a>
              <p class="title">
                <b>Example&nbsp;7.16.&nbsp;Flow Mapping Entries</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">{<br>? <code class="literal">explicit: entry</code>,
<code class="filename">implicit: entry</code>,
?<span class="property">°</span><span class="property">°</span>
}
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-flow-map-explicit-entry%28n,c%29">ns-flow-map-explicit-entry(n,c)</a></code>
  <code class="literal"><a class="link" href="#ns-flow-map-implicit-entry%28n,c%29">ns-flow-map-implicit-entry(n,c)</a></code>
  <span class="property"><a class="link" href="#e-node">e-node</a></span>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "explicit" : !!str "entry",
  ? !!str "implicit" : !!str "entry",
  ? !!null "" : !!null "",
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          Normally, YAML insists the <a id="id2791372" class="indexterm"></a><a id=": mapping value//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>:</code></strong></span>” mapping value indicator</em> be
          <a id="id2791392" class="indexterm"></a><a class="link" href="#space/separation/">separated</a>
          from the <a id="id2791408" class="indexterm"></a><a class="link" href="#value//">value</a> by <a id="id2791420" class="indexterm"></a><a class="link" href="#space/white/">white space</a>. A benefit of
          this restriction is that the “<span class="quote"><strong class="userinput"><code>:</code></strong></span>” character can be used
          inside <a id="id2791444" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a>, as long as it is not
          followed by <a id="id2791462" class="indexterm"></a><a class="link" href="#space/white/">white
          space</a>. This allows for unquoted URLs and timestamps. It is
          also a potential source for confusion as “<span class="quote"><strong class="userinput"><code>a:1</code></strong></span>” is a
          <a id="id2791487" class="indexterm"></a><a class="link" href="#style/flow/plain">plain
          scalar</a> and not a <a id="id2791505" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pair</a>.
        </p>
            <p>
          Note that the <a id="id2791522" class="indexterm"></a><a class="link" href="#value//">value</a> may be
          <a id="id2791535" class="indexterm"></a><a class="link" href="#node/completely%20empty/">completely
          empty</a> since its existence is indicated by the
          “<span class="quote"><strong class="userinput"><code>:</code></strong></span>”.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[144]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-map-implicit-entry(n,c)"></a>ns-flow-map-implicit-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;<a href="#ns-flow-map-yaml-key-entry%28n,c%29">ns-flow-map-yaml-key-entry(n,c)</a><br>
              | <a href="#c-ns-flow-map-empty-key-entry%28n,c%29">c-ns-flow-map-empty-key-entry(n,c)</a><br>
              | <a href="#c-ns-flow-map-json-key-entry%28n,c%29">c-ns-flow-map-json-key-entry(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[145]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-map-yaml-key-entry(n,c)"></a>ns-flow-map-yaml-key-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-flow-yaml-node%28n,c%29">ns-flow-yaml-node(n,c)</a><br>
              ( ( <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#c-ns-flow-map-separate-value%28n,c%29">c-ns-flow-map-separate-value(n,c)</a> )<br>
              | <a href="#e-node">e-node</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[146]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-flow-map-empty-key-entry(n,c)"></a>c-ns-flow-map-empty-key-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#e-node">e-node</a> /* Key */<br>
              <a href="#c-ns-flow-map-separate-value%28n,c%29">c-ns-flow-map-separate-value(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[147]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-flow-map-separate-value(n,c)"></a>c-ns-flow-map-separate-value(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
                /* Not followed by an<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ns-plain-safe%28c%29">ns-plain-safe(c)</a> */<br>
              ( ( <a href="#s-separate%28n,c%29">s-separate(n,c)</a>
              <a href="#ns-flow-node%28n,c%29">ns-flow-node(n,c)</a> )<br>
              | <a href="#e-node">e-node</a> /* Value */ )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2791704"></a>
              <p class="title">
                <b>Example&nbsp;7.17.&nbsp;Flow Mapping Separate Values</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">{<br><code class="filename">unquoted</code>·<code class="literal">:·"separate"</code>,
<code class="filename">http://foo.com</code>,
<code class="filename">omitted value</code><span class="honorific"><code class="literal">:<span class="property">°</span></code></span>,
<span class="property">°</span><code class="literal">:·omitted key</code>,
}
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-flow-yaml-node%28n,c%29">ns-flow-yaml-node(n,c)</a></code> <span class="property"><a class="link" href="#e-node">e-node</a></span>
  <code class="literal"><a class="link" href="#c-ns-flow-map-separate-value%28n,c%29">c-ns-flow-map-separate-value(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "unquoted" : !!str "separate",
  ? !!str "http://foo.com" : !!null "",
  ? !!str "omitted value" : !!null "",
  ? !!null "" : !!str "omitted key",
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          To ensure <a id="id2791841" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON
          compatibility</a>, if a <a id="id2791855" class="indexterm"></a><a class="link" href="#key//">key</a>
          inside a flow mapping is <a id="id2791868" class="indexterm"></a><a class="link" href="#JSON-like//">JSON-like</a>, YAML allows the following
          <a id="id2791882" class="indexterm"></a><a class="link" href="#value//">value</a> to be specified adjacent to
          the “<span class="quote"><strong class="userinput"><code>:</code></strong></span>”. This causes no ambiguity, as all <a id="id2791903" class="indexterm"></a><a class="link" href="#JSON-like//">JSON-like</a> <a id="id2791915" class="indexterm"></a><a class="link" href="#key//">keys</a> are surrounded by <a id="id2791928" class="indexterm"></a><a class="link" href="#indicator//">indicators</a>. However, as this greatly
          reduces readability, YAML <a id="id2791941" class="indexterm"></a><a class="link" href="#processor//">processors</a> should <a id="id2791954" class="indexterm"></a><a class="link" href="#space/separation/">separate</a> the
          <a id="id2791969" class="indexterm"></a><a class="link" href="#value//">value</a> from the “<span class="quote"><strong class="userinput"><code>:</code></strong></span>”
          on output, even in this case.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[148]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-flow-map-json-key-entry(n,c)"></a>c-ns-flow-map-json-key-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-flow-json-node%28n,c%29">c-flow-json-node(n,c)</a><br>
              ( ( <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#c-ns-flow-map-adjacent-value%28n,c%29">c-ns-flow-map-adjacent-value(n,c)</a> )<br>
              | <a href="#e-node">e-node</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[149]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-flow-map-adjacent-value(n,c)"></a>c-ns-flow-map-adjacent-value(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
              ( ( <a href="#s-separate%28n,c%29">s-separate(n,c)</a>?<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ns-flow-node%28n,c%29">ns-flow-node(n,c)</a> )<br>
              &nbsp;&nbsp;&nbsp;&nbsp;|
              <a href="#e-node">e-node</a> ) /* Value */
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2792073"></a>
              <p class="title">
                <b>Example&nbsp;7.18.&nbsp;Flow Mapping Adjacent Values</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">{<br><code class="filename">"adjacent"</code>:<code class="literal">value</code>,
<code class="filename">"readable"</code>:<code class="literal">·value</code>,
<code class="filename">"empty"</code>:<span class="property">°</span>
}
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-flow-json-node%28n,c%29">c-flow-json-node(n,c)</a></code> <span class="property"><a class="link" href="#e-node">e-node</a></span>
  <code class="literal"><a class="link" href="#c-ns-flow-map-adjacent-value%28n,c%29">c-ns-flow-map-adjacent-value(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "adjacent" : !!str "value",
  ? !!str "readable" : !!str "value",
  ? !!str "empty"    : !!null "",
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          A more compact notation is usable inside <a id="id2792196" class="indexterm"></a><a class="link" href="#style/flow/sequence">flow sequences</a>, if the
          <a id="id2792214" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> contains a <a id="id2792227" class="indexterm"></a><a id="style/single key:value pair mapping/"></a><em class="firstterm">single
          key:&nbsp;value pair</em>. This notation does not require the
          surrounding “<span class="quote"><strong class="userinput"><code>{</code></strong></span>” and “<span class="quote"><strong class="userinput"><code>}</code></strong></span>” characters.
          Note that it is not possible to specify any <a id="id2792262" class="indexterm"></a><a class="link" href="#node/property/">node properties</a> for the <a id="id2792277" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> in this case.
        </p>
            <div class="example">
              <a id="id2792291"></a>
              <p class="title">
                <b>Example&nbsp;7.19.&nbsp;Single Pair Flow Mappings</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">[<br><code class="filename">foo: bar</code>
]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-flow-pair%28n,c%29">ns-flow-pair(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!map { ? !!str "foo" : !!str "bar" }
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          If the “<span class="quote"><strong class="userinput"><code>?</code></strong></span>” indicator is explicitly specified, <a id="id2792366" class="indexterm"></a><a class="link" href="#parse//">parsing</a> is unambiguous, and the syntax is
          identical to the general case.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[150]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-pair(n,c)"></a>ns-flow-pair(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;(
              <a href="#c-mapping-key">“<span class="quote">?</span>”</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ns-flow-map-explicit-entry%28n,c%29">ns-flow-map-explicit-entry(n,c)</a> )<br>
              | <a href="#ns-flow-pair-entry%28n,c%29">ns-flow-pair-entry(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2792424"></a>
              <p class="title">
                <b>Example&nbsp;7.20.&nbsp;Single Pair Explicit Entry</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">[<br>? <code class="filename">foo
 bar : baz</code>
]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-flow-map-explicit-entry%28n,c%29">ns-flow-map-explicit-entry(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!map {
    ? !!str "foo bar"
    : !!str "baz",
  },
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          If the “<span class="quote"><strong class="userinput"><code>?</code></strong></span>” indicator is omitted, <a id="id2792501" class="indexterm"></a><a class="link" href="#parse//">parsing</a> needs to see past the <a id="id2792514" class="indexterm"></a><a id="key/implicit/"></a><em class="firstterm">implicit key</em> to
          recognize it as such. To limit the amount of lookahead required, the
          “<span class="quote"><strong class="userinput"><code>:</code></strong></span>” indicator must appear at most 1024 Unicode
          characters beyond the start of the <a id="id2792539" class="indexterm"></a><a class="link" href="#key//">key</a>. In addition, the <a id="id2792552" class="indexterm"></a><a class="link" href="#key//">key</a> is restricted to a single line.
        </p>
            <p>
          Note that YAML allows arbitrary <a id="id2792569" class="indexterm"></a><a class="link" href="#node//">nodes</a> to be used as <a id="id2792581" class="indexterm"></a><a class="link" href="#key//">keys</a>. In particular, a <a id="id2792594" class="indexterm"></a><a class="link" href="#key//">key</a> may be a <a id="id2792606" class="indexterm"></a><a class="link" href="#sequence//">sequence</a> or a <a id="id2792618" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>. Thus, without the above
          restrictions, practical one-pass <a id="id2792632" class="indexterm"></a><a class="link" href="#parse//">parsing</a> would have been impossible to
          implement.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[151]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-pair-entry(n,c)"></a>ns-flow-pair-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;<a href="#ns-flow-pair-yaml-key-entry%28n,c%29">ns-flow-pair-yaml-key-entry(n,c)</a><br>
              | <a href="#c-ns-flow-map-empty-key-entry%28n,c%29">c-ns-flow-map-empty-key-entry(n,c)</a><br>
              | <a href="#c-ns-flow-pair-json-key-entry%28n,c%29">c-ns-flow-pair-json-key-entry(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[152]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-flow-pair-yaml-key-entry(n,c)"></a>ns-flow-pair-yaml-key-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-s-implicit-yaml-key%28c%29">ns-s-implicit-yaml-key(flow-key)</a><br>
              <a href="#c-ns-flow-map-separate-value%28n,c%29">c-ns-flow-map-separate-value(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[153]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-ns-flow-pair-json-key-entry(n,c)"></a>c-ns-flow-pair-json-key-entry(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-s-implicit-json-key%28c%29">c-s-implicit-json-key(flow-key)</a><br>
              <a href="#c-ns-flow-map-adjacent-value%28n,c%29">c-ns-flow-map-adjacent-value(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[154]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-s-implicit-yaml-key(c)"></a>ns-s-implicit-yaml-key(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-flow-yaml-node%28n,c%29">ns-flow-yaml-node(n/a,c)</a>
              <a href="#s-separate-in-line">s-separate-in-line</a>?<br>
              /* At most 1024 characters altogether */
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[155]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-s-implicit-json-key(c)"></a>c-s-implicit-json-key(c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-flow-json-node%28n,c%29">c-flow-json-node(n/a,c)</a>
              <a href="#s-separate-in-line">s-separate-in-line</a>?<br>
              /* At most 1024 characters altogether */
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2792785"></a>
              <p class="title">
                <b>Example&nbsp;7.21.&nbsp;Single Pair Implicit Entries</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">- [ <code class="filename">YAML·</code><code class="constant">: separate</code> ]<br>- [ <code class="literal">°</code><code class="constant">: empty key entry</code> ]
- [ <span class="property">{JSON: like}</span><code class="constant">:adjacent</code> ]
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-s-implicit-yaml-key%28c%29">ns-s-implicit-yaml-key</a></code>
  <span class="property"><a class="link" href="#c-s-implicit-json-key%28c%29">c-s-implicit-json-key</a></span>
  <code class="literal"><a class="link" href="#e-node">e-node</a></code> <code class="constant">Value</code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!seq [
    !!map {
      ? !!str "YAML"
      : !!str "separate"
    },
  ],
  !!seq [
    !!map {
      ? !!null ""
      : !!str "empty key entry"
    },
  ],
  !!seq [
    !!map {
      ? !!map {
        ? !!str "JSON"
        : !!str "like"
      } : "adjacent",
    },
  ],
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="example">
              <a id="id2792902"></a>
              <p class="title">
                <b>Example&nbsp;7.22.&nbsp;Invalid Implicit Keys</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="screen"><span class="database">[ <code class="filename">foo<br> bar</code>: invalid,
 <code class="literal">"foo<span class="emphasis"><em>...&gt;1K characters...</em></span>bar"</code>: invalid ]
</span></pre>
          </td>
                    <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>- The <code class="filename">foo bar</code> key spans multiple lines
- The <code class="literal">foo...bar</code> key is too long
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2792977"></a>7.5.&nbsp;Flow Nodes</h2>
              </div>
            </div>
          </div>
          <p>
        <a id="id2792985" class="indexterm"></a><a id="JSON-like//"></a><em class="firstterm">JSON-like</em> <a id="id2792999" class="indexterm"></a><a class="link" href="#style/flow/">flow styles</a> all have
        explicit start and end <a id="id2793014" class="indexterm"></a><a class="link" href="#indicator//">indicators</a>. The only <a id="id2793027" class="indexterm"></a><a class="link" href="#style/flow/">flow style</a> that does not
        have this property is the <a id="id2793043" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalar</a>. Note that none of the
        “<span class="quote">JSON-like</span>” styles is actually acceptable by JSON. Even
        the <a id="id2793066" class="indexterm"></a><a class="link" href="#style/flow/double-quoted">double-quoted style</a> is a superset of
        the JSON string format.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[156]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-flow-yaml-content(n,c)"></a>ns-flow-yaml-content(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-plain%28n,c%29">ns-plain(n,c)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[157]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-flow-json-content(n,c)"></a>c-flow-json-content(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;<a href="#c-flow-sequence%28n,c%29">c-flow-sequence(n,c)</a>
            | <a href="#c-flow-mapping%28n,c%29">c-flow-mapping(n,c)</a><br>
            | <a href="#c-single-quoted%28n,c%29">c-single-quoted(n,c)</a>
            | <a href="#c-double-quoted%28n,c%29">c-double-quoted(n,c)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[158]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-flow-content(n,c)"></a>ns-flow-content(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#ns-flow-yaml-content%28n,c%29">ns-flow-yaml-content(n,c)</a>
            | <a href="#c-flow-json-content%28n,c%29">c-flow-json-content(n,c)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2793163"></a>
            <p class="title">
              <b>Example&nbsp;7.23.&nbsp;Flow Content</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">- <code class="filename">[ a, b ]</code><br>- <code class="filename">{ a: b }</code>
- <code class="filename">"a"</code>
- <code class="filename">'b'</code>
- <code class="literal">c</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-flow-json-content%28n,c%29">c-flow-json-content(n,c)</a></code>
  <code class="literal"><a class="link" href="#ns-flow-yaml-content%28n,c%29">ns-flow-yaml-content(n,c)</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!seq [ !!str "a", !!str "b" ],
  !!map { ? !!str "a" : !!str "b" },
  !!str "a",
  !!str "b",
  !!str "c",
]
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        A complete <a id="id2793268" class="indexterm"></a><a class="link" href="#style/flow/">flow</a>
        <a id="id2793283" class="indexterm"></a><a class="link" href="#node//">node</a> also has optional <a id="id2793296" class="indexterm"></a><a class="link" href="#node/property/">node properties</a>, except
        for <a id="id2793311" class="indexterm"></a><a class="link" href="#alias//">alias nodes</a> which refer to the
        <a id="id2793324" class="indexterm"></a><a class="link" href="#anchor//">anchored</a> <a id="id2793337" class="indexterm"></a><a class="link" href="#node/property/">node properties</a>.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[159]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-flow-yaml-node(n,c)"></a>ns-flow-yaml-node(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;<a href="#c-ns-alias-node">c-ns-alias-node</a><br>
            | <a href="#ns-flow-yaml-content%28n,c%29">ns-flow-yaml-content(n,c)</a><br>
            | ( <a href="#c-ns-properties%28n,c%29">c-ns-properties(n,c)</a><br>
            &nbsp;&nbsp;&nbsp;&nbsp;( (
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ns-flow-yaml-content%28n,c%29">ns-flow-yaml-content(n,c)</a> )<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|
              <a href="#e-scalar">e-scalar</a> ) )
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[160]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="c-flow-json-node(n,c)"></a>c-flow-json-node(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            ( <a href="#c-ns-properties%28n,c%29">c-ns-properties(n,c)</a>
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a> )?<br>
            <a href="#c-flow-json-content%28n,c%29">c-flow-json-content(n,c)</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[161]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="ns-flow-node(n,c)"></a>ns-flow-node(n,c)</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;<a href="#c-ns-alias-node">c-ns-alias-node</a><br>
            | <a href="#ns-flow-content%28n,c%29">ns-flow-content(n,c)</a><br>
            | ( <a href="#c-ns-properties%28n,c%29">c-ns-properties(n,c)</a><br>
            &nbsp;&nbsp;&nbsp;&nbsp;( (
              <a href="#s-separate%28n,c%29">s-separate(n,c)</a><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ns-flow-content%28n,c%29">ns-flow-content(n,c)</a> )<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|
              <a href="#e-scalar">e-scalar</a> ) )
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2793490"></a>
            <p class="title">
              <b>Example&nbsp;7.24.&nbsp;Flow Nodes</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database">- <code class="filename">!!str "a"</code><br>- <code class="filename">'b'</code>
- <code class="filename">&amp;anchor "c"</code>
- <code class="literal">*anchor</code>
- <code class="literal">!!str°</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-flow-json-node%28n,c%29">c-flow-json-node(n,c)</a></code>
  <code class="literal"><a class="link" href="#ns-flow-yaml-node%28n,c%29">ns-flow-yaml-node(n,c)</a></code>
</pre>
          </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!str "a",
  !!str "b",
  &amp;A !!str "c",
  *A,
  !!str "",
]
</span></pre>
          </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Block"></a>Chapter&nbsp;8.&nbsp;Block Styles</h2>
            </div>
          </div>
        </div>
        <p>
      YAML’s <a id="id2793604" class="indexterm"></a><a id="style/block/"></a><em class="firstterm">block
      styles</em> employ <a id="id2793621" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> rather than <a id="id2793637" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> to denote structure. This
      results in a more human readable (though less compact) notation.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2793652"></a>8.1.&nbsp;Block Scalar Styles</h2>
              </div>
            </div>
          </div>
          <p>
        YAML provides two <a id="id2793660" class="indexterm"></a><a id="style/block/scalar"></a><em class="firstterm">block scalar styles</em>, <a id="id2793679" class="indexterm"></a><a class="link" href="#style/block/literal">literal</a>
        and <a id="id2793697" class="indexterm"></a><a class="link" href="#style/block/folded">folded</a>. Each provides a different trade-off
        between readability and expressive power.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2793718"></a>8.1.1.&nbsp;Block Scalar Headers</h3>
                </div>
              </div>
            </div>
            <p>
          <a id="id2793726" class="indexterm"></a><a class="link" href="#style/block/scalar">Block
          scalars</a> are controlled by a few <a id="id2793744" class="indexterm"></a><a class="link" href="#indicator//">indicators</a> given in a <a id="id2793757" class="indexterm"></a><a id="block scalar header//"></a><em class="firstterm">header</em> preceding the <a id="id2793772" class="indexterm"></a><a class="link" href="#content//">content</a> itself. This header is followed
          by a non-content <a id="id2793786" class="indexterm"></a><a class="link" href="#line%20break//">line break</a>
          with an optional <a id="id2793799" class="indexterm"></a><a class="link" href="#comment//">comment</a>. This
          is the only case where a <a id="id2793812" class="indexterm"></a><a class="link" href="#comment//">comment</a>
          must not be followed by additional <a id="id2793826" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[162]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-b-block-header(m,t)"></a>c-b-block-header(m,t)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( (
                <a href="#c-indentation-indicator%28m%29">c-indentation-indicator(m)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#c-chomping-indicator%28t%29">c-chomping-indicator(t)</a> )<br>
              | ( <a href="#c-chomping-indicator%28t%29">c-chomping-indicator(t)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;<a href="#c-indentation-indicator%28m%29">c-indentation-indicator(m)</a> ) )<br>
              <a href="#s-b-comment">s-b-comment</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2793888"></a>
              <p class="title">
                <b>Example&nbsp;8.1.&nbsp;Block Scalar Header</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">- |<code class="filename"> # Empty header↓</code><br> literal
- &gt;<code class="filename">1 # Indentation indicator↓</code>
 ·folded
- |<code class="filename">+ # Chomping indicator↓</code>
 keep

- &gt;<code class="filename">1- # Both indicators↓</code>
 ·strip

</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!str "literal\n",
  !!str "·folded\n",
  !!str "keep\n\n",
  !!str "·strip",
]
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#c-b-block-header%28m,t%29">c-b-block-header(m,t)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2793979"></a>8.1.1.1.&nbsp;Block Indentation Indicator</h4>
                  </div>
                </div>
              </div>
              <p>
            Typically, the <a id="id2793988" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> level of a <a id="id2794003" class="indexterm"></a><a class="link" href="#style/block/scalar">block
            scalar</a> is detected from its first non-<a id="id2794022" class="indexterm"></a><a class="link" href="#empty%20line//">empty</a> line. It is an error for any
            of the leading <a id="id2794036" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a>
            to contain more <a id="id2794049" class="indexterm"></a><a class="link" href="#space//">spaces</a> than the
            first non-<a id="id2794062" class="indexterm"></a><a class="link" href="#empty%20line//">empty line</a>.
          </p>
              <p>
            Detection fails when the first non-<a id="id2794079" class="indexterm"></a><a class="link" href="#empty%20line//">empty line</a> contains leading content <a id="id2794093" class="indexterm"></a><a class="link" href="#space//">space</a> characters. <a id="id2794105" class="indexterm"></a><a class="link" href="#content//">Content</a> may safely start with a
            <a id="id2794118" class="indexterm"></a><a class="link" href="#tab//">tab</a> or a <a id="id2794131" class="indexterm"></a><a class="link" href="##%20comment//">“<span class="quote"><strong class="userinput"><code>#</code></strong></span>”</a> character.
          </p>
              <p>
            When detection would fail, YAML requires that the <a id="id2794152" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> level
            for the <a id="id2794168" class="indexterm"></a><a class="link" href="#content//">content</a> be given using
            an explicit <a id="id2794181" class="indexterm"></a><a id="indicator/indentation/"></a><em class="firstterm">indentation indicator</em>. This level
            is specified as the integer number of the additional <a id="id2794200" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a>
            spaces used for the <a id="id2794216" class="indexterm"></a><a class="link" href="#content//">content</a>,
            relative to its parent <a id="id2794229" class="indexterm"></a><a class="link" href="#node//">node</a>.
          </p>
              <p>
            It is always valid to specify an indentation indicator for a
            <a id="id2794246" class="indexterm"></a><a class="link" href="#style/block/scalar">block
            scalar</a> node, though a YAML <a id="id2794265" class="indexterm"></a><a class="link" href="#processor//">processor</a> should only emit an
            explicit indentation indicator for cases where detection will fail.
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[163]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-indentation-indicator(m)"></a>c-indentation-indicator(m)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#ns-dec-digit">ns-dec-digit</a>
                  ⇒ m = <a href="#ns-dec-digit">ns-dec-digit</a> - #x30<br>
                /* Empty */&nbsp; ⇒ m = auto-detect()
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2794311"></a>
                <p class="title">
                  <b>Example&nbsp;8.2.&nbsp;Block Indentation Indicator</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">- |<code class="filename">°</code><br><code class="literal">·</code>detected
- &gt;<code class="filename">°</code>
<code class="literal">·</code>
<code class="literal">··</code>
<code class="literal">··</code># detected
- |<code class="filename">1</code>
<code class="literal">·</code>·explicit
- &gt;<code class="filename">°</code>
<code class="literal">·</code>→
<code class="literal">·</code>detected
</span></pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!str "detected\n",
  !!str "\n\n# detected\n",
  !!str "·explicit\n",
  !!str "\t·detected\n",
]
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#c-indentation-indicator%28m%29">c-indentation-indicator(m)</a></code>
   <code class="literal"><a class="link" href="#s-indent%28n%29">s-indent(n)</a></code>
</pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
              <div class="example">
                <a id="id2794450"></a>
                <p class="title">
                  <b>Example&nbsp;8.3.&nbsp;Invalid Block Scalar Indentation Indicators</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="screen"><span class="database">- |<br>·<code class="filename">·</code>
·text
- &gt;
··text
<code class="literal">·</code>text
- |2
<span class="property">·</span>text
</span></pre>
              </td>
                      <td width="50%">
<pre class="screen"><span class="database">ERROR:<br>- A leading all-space line must
  not have too many <code class="filename">spaces</code>.
- A following text line must
  not be <code class="literal">less indented</code>.
- The text is <span class="property">less indented</span>
  than the indicated level.
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2794534"></a>8.1.1.2.&nbsp;Block Chomping Indicator</h4>
                  </div>
                </div>
              </div>
              <p>
            <a id="id2794542" class="indexterm"></a><a id="chomping//"></a><em class="firstterm">Chomping</em> controls how final
            <a id="id2794556" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> and trailing
            <a id="id2794569" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are
            interpreted. YAML provides three chomping methods:
          </p>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">Strip</span>
                  </dt>
                  <dd><a id="id2794594" class="indexterm"></a><a id="chomping/strip/"></a><em class="firstterm">Stripping</em> is specified by the
                <a id="id2794611" class="indexterm"></a><a id="- strip chomping//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>”
                chomping indicator</em>. In this case, the final
                <a id="id2794631" class="indexterm"></a><a class="link" href="#line%20break//">line break</a> and any
                trailing <a id="id2794645" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a>
                are excluded from the <a id="id2794658" class="indexterm"></a><a class="link" href="#scalar//">scalar’s
                content</a>.
              </dd>
                  <dt>
                    <span class="term">Clip</span>
                  </dt>
                  <dd><a id="id2794682" class="indexterm"></a><a id="chomping/clip/"></a><em class="firstterm">Clipping</em> is the default behavior
                used if no explicit chomping indicator is specified. In this
                case, the final <a id="id2794700" class="indexterm"></a><a class="link" href="#line%20break//">line
                break</a> character is preserved in the <a id="id2794714" class="indexterm"></a><a class="link" href="#scalar//">scalar’s content</a>. However, any
                trailing <a id="id2794728" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a>
                are excluded from the <a id="id2794741" class="indexterm"></a><a class="link" href="#scalar//">scalar’s
                content</a>.
              </dd>
                  <dt>
                    <span class="term">Keep</span>
                  </dt>
                  <dd><a id="id2794764" class="indexterm"></a><a id="chomping/keep/"></a><em class="firstterm">Keeping</em>
                is specified by the <a id="id2794782" class="indexterm"></a><a id="+ keep chomping//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>+</code></strong></span>” chomping indicator</em>. In
                this case, the final <a id="id2794803" class="indexterm"></a><a class="link" href="#line%20break//">line
                break</a> and any trailing <a id="id2794816" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are considered to be part of the
                <a id="id2794831" class="indexterm"></a><a class="link" href="#scalar//">scalar’s content</a>. These
                additional lines are not subject to <a id="id2794845" class="indexterm"></a><a class="link" href="#line%20folding//">folding</a>.
              </dd>
                </dl>
              </div>
              <p>
            The chomping method used is a <a id="id2794864" class="indexterm"></a><a class="link" href="#presentation/detail/">presentation detail</a> and must not be
            used to convey <a id="id2794881" class="indexterm"></a><a class="link" href="#content//">content</a>
            information.
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[164]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="c-chomping-indicator(t)"></a>c-chomping-indicator(t)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                “<span class="quote">-</span>”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⇒
                  <code class="varname">t</code> = strip<br>
                “<span class="quote">+</span>”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⇒
                <code class="varname">t</code> = keep<br>
                /* Empty */ ⇒
                  <code class="varname">t</code> = clip
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <p>
            The interpretation of the final <a id="id2794939" class="indexterm"></a><a class="link" href="#line%20break//">line
            break</a> of a <a id="id2794952" class="indexterm"></a><a class="link" href="#style/block/scalar">block scalar</a> is controlled by the
            chomping indicator specified in the <a id="id2794971" class="indexterm"></a><a class="link" href="#block%20scalar%20header//">block scalar header</a>.
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[165]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="b-chomped-last(t)"></a>b-chomped-last(t)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <code class="varname">t</code> = strip ⇒
                <a href="#b-non-content">b-non-content</a> | /* End of file */<br>
                <code class="varname">t</code> = clip&nbsp; ⇒
                <a href="#b-as-line-feed">b-as-line-feed</a> | /* End of file */<br>
                <code class="varname">t</code> = keep&nbsp; ⇒
                <a href="#b-as-line-feed">b-as-line-feed</a> | /* End of file */
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2795034"></a>
                <p class="title">
                  <b>Example&nbsp;8.4.&nbsp;Chomping Final Line Break</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">strip: |-<br>  text<code class="filename">↓</code>
clip: |
  text<code class="literal">↓</code>
keep: |+
  text<code class="literal">↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#b-non-content">b-non-content</a></code> <code class="literal"><a class="link" href="#b-as-line-feed">b-as-line-feed</a></code>
</pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "strip"
  : !!str "text",
  ? !!str "clip"
  : !!str "text\n",
  ? !!str "keep"
  : !!str "text\n",
}
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
              <p>
            The interpretation of the trailing <a id="id2795131" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> following a <a id="id2795144" class="indexterm"></a><a class="link" href="#style/block/scalar">block scalar</a> is also
            controlled by the chomping indicator specified in the <a id="id2795163" class="indexterm"></a><a class="link" href="#block%20scalar%20header//">block scalar header</a>.
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[166]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="l-chomped-empty(n,t)"></a>l-chomped-empty(n,t)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <code class="varname">t</code> = strip ⇒
                <a href="#l-strip-empty%28n%29">l-strip-empty(n)</a><br>
                <code class="varname">t</code> = clip&nbsp; ⇒
                <a href="#l-strip-empty%28n%29">l-strip-empty(n)</a><br>
                <code class="varname">t</code> = keep&nbsp; ⇒
                <a href="#l-keep-empty%28n%29">l-keep-empty(n)</a>
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                      <tr>
                        <td class="productioncounter" valign="top" align="left">[167]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="l-strip-empty(n)"></a>l-strip-empty(n)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                ( <a href="#s-indent%28n%29">s-indent(≤n)</a>
                <a href="#b-non-content">b-non-content</a> )*<br>
                <a href="#l-trail-comments%28n%29">l-trail-comments(n)</a>?
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                      <tr>
                        <td class="productioncounter" valign="top" align="left">[168]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="l-keep-empty(n)"></a>l-keep-empty(n)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#l-empty%28n,c%29">l-empty(n,block-in)</a>*<br>
                <a href="#l-trail-comments%28n%29">l-trail-comments(n)</a>?
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <p>
            Explicit <a id="id2795281" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines may
            follow the trailing <a id="id2795295" class="indexterm"></a><a class="link" href="#empty%20line//">empty
            lines</a>. To prevent ambiguity, the first such <a id="id2795309" class="indexterm"></a><a class="link" href="#comment//">comment</a> line must be less <a id="id2795321" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> than the
            <a id="id2795337" class="indexterm"></a><a class="link" href="#style/block/scalar">block
            scalar content</a>. Additional <a id="id2795355" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines, if any, are not so
            restricted. This is the only case where the <a id="id2795369" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> of
            <a id="id2795384" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines is constrained.
          </p>
              <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
                <tbody><tr>
                  <td width="50%">
                    <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                      <tbody><tr>
                        <td class="productioncounter" valign="top" align="left">[169]</td>
                        <td class="productionlhs" valign="top" align="right"><a id="l-trail-comments(n)"></a>l-trail-comments(n)</td>
                        <td class="productionseperator" valign="top" align="center">
                          <code>::=</code>
                        </td>
                        <td class="productionrhs" valign="top">
                <a href="#s-indent%28n%29">s-indent(&lt;n)</a>
                <a href="#c-nb-comment-text">c-nb-comment-text</a>
                <a href="#b-comment">b-comment</a><br>
                <a href="#l-comment">l-comment</a>*
              </td>
                        <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                      </tr>
                    </tbody></table>
                  </td>
                </tr>
              </tbody></table>
              <div class="example">
                <a id="id2795435"></a>
                <p class="title">
                  <b>Example&nbsp;8.5.&nbsp;Chomping Trailing Lines</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database"> # Strip<br>  # Comments:
strip: |-
  # text↓
<span class="honorific"><code class="filename">··⇓
<span class="property">·# Clip
··# comments:
↓</span></code></span>
clip: |
  # text↓
<span class="honorific"><code class="filename">·↓
<span class="property">·# Keep
··# comments:
↓</span></code></span>
keep: |+
  # text↓
<span class="honorific"><code class="literal">↓
<span class="property">·# Trail
··# comments.</span></code></span>
</span></pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "strip"
  : !!str "# text",
  ? !!str "clip"
  : !!str "# text\n",
  ? !!str "keep"
  : !!str "# text\n",
}
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#l-strip-empty%28n%29">l-strip-empty(n)</a></code>
   <code class="literal"><a class="link" href="#l-keep-empty%28n%29">l-keep-empty(n)</a></code>
   <span class="property"><a class="link" href="#l-trail-comments%28n%29">l-trail-comments(n)</a></span>
</pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
              <p>
            If a <a id="id2795562" class="indexterm"></a><a class="link" href="#style/block/scalar">block scalar</a> consists only of <a id="id2795580" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a>, then these lines are
            considered as trailing lines and hence are affected by chomping.
          </p>
              <div class="example">
                <a id="id2795596"></a>
                <p class="title">
                  <b>Example&nbsp;8.6.&nbsp;Empty Scalar Chomping</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">strip: &gt;-<br><code class="filename">↓</code>
clip: &gt;
<code class="filename">↓</code>
keep: |+
<code class="literal">↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#l-strip-empty%28n%29">l-strip-empty(n)</a></code> <code class="literal"><a class="link" href="#l-keep-empty%28n%29">l-keep-empty(n)</a></code>
</pre>
              </td>
                      <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "strip"
  : !!str "",
  ? !!str "clip"
  : !!str "",
  ? !!str "keep"
  : !!str "\n",
}
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2795688"></a>8.1.2.&nbsp;Literal Style</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2795697" class="indexterm"></a><a id="style/block/literal"></a><em class="firstterm">literal style</em> is denoted by the <a id="id2795716" class="indexterm"></a><a id="| literal style//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>|</code></strong></span>” indicator</em>. It
          is the simplest, most restricted, and most readable <a id="id2795737" class="indexterm"></a><a class="link" href="#style/scalar/">scalar style</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[170]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-l+literal(n)"></a>c-l+literal(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-literal">“<span class="quote">|</span>”</a>
              <a href="#c-b-block-header%28m,t%29">c-b-block-header(m,t)</a><br>
              <a href="#l-literal-content%28n,t%29">l-literal-content(n+m,t)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2795789"></a>
              <p class="title">
                <b>Example&nbsp;8.7.&nbsp;Literal Scalar</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">|↓<br>·literal↓
·→text↓
↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-l+literal%28n%29">c-l+literal(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "literal\n\ttext\n"
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          Inside literal scalars, all (<a id="id2795860" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a>) characters are considered
          to be <a id="id2795876" class="indexterm"></a><a class="link" href="#content//">content</a>, including
          <a id="id2795888" class="indexterm"></a><a class="link" href="#space/white/">white space</a>
          characters. Note that all <a id="id2795905" class="indexterm"></a><a class="link" href="#line%20break//">line
          break</a> characters are <a id="id2795918" class="indexterm"></a><a class="link" href="#line%20break/normalization/">normalized</a>. In addition, <a id="id2795935" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are not <a id="id2795948" class="indexterm"></a><a class="link" href="#style/block/folded">folded</a>,
          though final <a id="id2795966" class="indexterm"></a><a class="link" href="#line%20break//">line breaks</a> and
          trailing <a id="id2795979" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> are
          <a id="id2795992" class="indexterm"></a><a class="link" href="#chomping//">chomped</a>.
        </p>
            <p>
          There is no way to escape characters inside literal scalars. This
          restricts them to <a id="id2796010" class="indexterm"></a><a class="link" href="#printable%20character//">printable</a> characters. In addition, there is no
          way to break a long literal line.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[171]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-nb-literal-text(n)"></a>l-nb-literal-text(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#l-empty%28n,c%29">l-empty(n,block-in)</a>*<br>
              <a href="#s-indent%28n%29">s-indent(n)</a>
              <a href="#nb-char">nb-char</a>+
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[172]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="b-nb-literal-next(n)"></a>b-nb-literal-next(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#b-as-line-feed">b-as-line-feed</a><br>
              <a href="#l-nb-literal-text%28n%29">l-nb-literal-text(n)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[173]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-literal-content(n,t)"></a>l-literal-content(n,t)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#l-nb-literal-text%28n%29">l-nb-literal-text(n)</a>
              <a href="#b-nb-literal-next%28n%29">b-nb-literal-next(n)</a>*<br>
              &nbsp;&nbsp;<a href="#b-chomped-last%28t%29">b-chomped-last(t)</a> )?<br>
              <a href="#l-chomped-empty%28n,t%29">l-chomped-empty(n,t)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2796118"></a>
              <p class="title">
                <b>Example&nbsp;8.8.&nbsp;Literal Content</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">|<br><code class="filename">·
··
··literal</code><span class="honorific"><code class="literal">↓
<code class="filename">···</code></code></span><span class="honorific"><code class="literal">↓
<code class="filename">··
··text</code></code></span><span class="property">↓</span>
<code class="constant">↓
·# Comment</code>
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "\n\nliteral\n·\n\ntext\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#l-nb-literal-text%28n%29">l-nb-literal-text(n)</a></code>
   <code class="literal"><a class="link" href="#b-nb-literal-next%28n%29">b-nb-literal-next(n)</a></code>
   <span class="property"><a class="link" href="#b-chomped-last%28t%29">b-chomped-last(t)</a></span>
   <code class="constant"><a class="link" href="#l-chomped-empty%28n,t%29">l-chomped-empty(n,t)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2796251"></a>8.1.3.&nbsp;Folded Style</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2796259" class="indexterm"></a><a id="style/block/folded"></a><em class="firstterm">folded style</em> is denoted by the <a id="id2796278" class="indexterm"></a><a id="&gt; folded style//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>&gt;</code></strong></span>” indicator</em>.
          It is similar to the <a id="id2796299" class="indexterm"></a><a class="link" href="#style/block/literal">literal style</a>; however, folded scalars
          are subject to <a id="id2796317" class="indexterm"></a><a class="link" href="#line%20folding/block/">line
          folding</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[174]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-l+folded(n)"></a>c-l+folded(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-folded">“<span class="quote">&gt;</span>”</a>
              <a href="#c-b-block-header%28m,t%29">c-b-block-header(m,t)</a><br>
              <a href="#l-folded-content%28n,t%29">l-folded-content(n+m,t)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2796371"></a>
              <p class="title">
                <b>Example&nbsp;8.9.&nbsp;Folded Scalar</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">&gt;↓<br>·folded↓
·text↓
↓</code>
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "folded text\n"
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-l+folded%28n%29">c-l+folded(n)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          <a id="id2796440" class="indexterm"></a><a class="link" href="#line%20folding//">Folding</a> allows long lines
          to be broken anywhere a single <a id="id2796454" class="indexterm"></a><a class="link" href="#space//">space</a> character separates two non-<a id="id2796467" class="indexterm"></a><a class="link" href="#space/white/">space</a> characters.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[175]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-nb-folded-text(n)"></a>s-nb-folded-text(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-indent%28n%29">s-indent(n)</a>
              <a href="#ns-char">ns-char</a>
              <a href="#nb-char">nb-char</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[176]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-nb-folded-lines(n)"></a>l-nb-folded-lines(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-nb-folded-text%28n%29">s-nb-folded-text(n)</a><br>
              ( <a href="#b-l-folded%28n,c%29">b-l-folded(n,block-in)</a>
              <a href="#s-nb-folded-text%28n%29">s-nb-folded-text(n)</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2796543"></a>
              <p class="title">
                <b>Example&nbsp;8.10.&nbsp;Folded Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">&gt;<br>
<span class="honorific"><code class="literal"><code class="filename">·folded</code>↓
<code class="filename">·line</code>↓
↓
<code class="filename">·next</code>
<code class="filename">·line</code></code></span>↓
   * bullet

   * list
   * lines

<span class="honorific"><code class="literal"><code class="filename">·last</code>↓
<code class="filename">·line</code></code></span>↓

# Comment
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "\n\
      folded line\n\
      next line\n\
      \  * bullet\n
      \n\
      \  * list\n\
      \  * lines\n\
      \n\
      last line\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#s-nb-folded-text%28n%29">s-nb-folded-text(n)</a></code>
   <code class="literal"><a class="link" href="#l-nb-folded-lines%28n%29">l-nb-folded-lines(n)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          (The following three examples duplicate this example, each
          highlighting different productions.)
        </p>
            <p>
          Lines starting with <a id="id2796671" class="indexterm"></a><a class="link" href="#space/white/">white
          space</a> characters (<a id="id2796687" class="indexterm"></a><a id="more-indented//"></a><em class="firstterm">more-indented</em> lines) are not
          <a id="id2796702" class="indexterm"></a><a class="link" href="#line%20folding//">folded</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[177]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-nb-spaced-text(n)"></a>s-nb-spaced-text(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-indent%28n%29">s-indent(n)</a>
              <a href="#s-white">s-white</a>
              <a href="#nb-char">nb-char</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[178]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="b-l-spaced(n)"></a>b-l-spaced(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#b-as-line-feed">b-as-line-feed</a><br>
              <a href="#l-empty%28n,c%29">l-empty(n,block-in)</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[179]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-nb-spaced-lines(n)"></a>l-nb-spaced-lines(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-nb-spaced-text%28n%29">s-nb-spaced-text(n)</a><br>
              ( <a href="#b-l-spaced%28n%29">b-l-spaced(n)</a>
              <a href="#s-nb-spaced-text%28n%29">s-nb-spaced-text(n)</a> )*<br>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2796800"></a>
              <p class="title">
                <b>Example&nbsp;8.11.&nbsp;More Indented Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">&gt;<br>
 folded
 line

 next
 line
<span class="honorific"><code class="literal"><code class="filename">···* bullet</code>↓
↓
<code class="filename">···* list</code>↓
<code class="filename">···* lines</code></code></span>↓

 last
 line

# Comment
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "\n\
      folded line\n\
      next line\n\
      \  * bullet\n
      \n\
      \  * list\n\
      \  * lines\n\
      \n\
      last line\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#s-nb-spaced-text%28n%29">s-nb-spaced-text(n)</a></code>
   <code class="literal"><a class="link" href="#l-nb-spaced-lines%28n%29">l-nb-spaced-lines(n)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          <a id="id2796902" class="indexterm"></a><a class="link" href="#line%20break//">Line breaks</a> and <a id="id2796916" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> separating folded and
          more-indented lines are also not <a id="id2796929" class="indexterm"></a><a class="link" href="#line%20folding//">folded</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[180]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-nb-same-lines(n)"></a>l-nb-same-lines(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#l-empty%28n,c%29">l-empty(n,block-in)</a>*<br>
              ( <a href="#l-nb-folded-lines%28n%29">l-nb-folded-lines(n)</a>
              | <a href="#l-nb-spaced-lines%28n%29">l-nb-spaced-lines(n)</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[181]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-nb-diff-lines(n)"></a>l-nb-diff-lines(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#l-nb-same-lines%28n%29">l-nb-same-lines(n)</a><br>
              ( <a href="#b-as-line-feed">b-as-line-feed</a>
              <a href="#l-nb-same-lines%28n%29">l-nb-same-lines(n)</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2797006"></a>
              <p class="title">
                <b>Example&nbsp;8.12.&nbsp;Empty Separation Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">&gt;<br><code class="literal">↓</code>
 folded
 line<code class="filename">↓</code>
<code class="literal">↓</code>
 next
 line<code class="filename">↓</code>
   * bullet

   * list
   * line<code class="filename">↓</code>
<code class="literal">↓</code>
 last
 line

# Comment
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "\n\
      folded line\n\
      next line\n\
      \  * bullet\n
      \n\
      \  * list\n\
      \  * lines\n\
      \n\
      last line\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#b-as-line-feed">b-as-line-feed</a></code>
   <code class="literal">(separation) <a class="link" href="#l-empty%28n,c%29">l-empty(n,c)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          The final <a id="id2797119" class="indexterm"></a><a class="link" href="#line%20break//">line break</a>, and
          trailing <a id="id2797133" class="indexterm"></a><a class="link" href="#empty%20line//">empty lines</a> if any,
          are subject to <a id="id2797146" class="indexterm"></a><a class="link" href="#chomping//">chomping</a> and are
          never <a id="id2797158" class="indexterm"></a><a class="link" href="#line%20folding//">folded</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[182]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-folded-content(n,t)"></a>l-folded-content(n,t)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#l-nb-diff-lines%28n%29">l-nb-diff-lines(n)</a>
              <a href="#b-chomped-last%28t%29">b-chomped-last(t)</a> )?<br>
              <a href="#l-chomped-empty%28n,t%29">l-chomped-empty(n,t)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2797205"></a>
              <p class="title">
                <b>Example&nbsp;8.13.&nbsp;Final Empty Lines</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">&gt;<br> folded
 line

 next
 line
   * bullet

   * list
   * line

 last
 line<code class="filename">↓</code>
<code class="literal">↓
# Comment</code>
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "\n\
      folded line\n\
      next line\n\
      \  * bullet\n
      \n\
      \  * list\n\
      \  * lines\n\
      \n\
      last line\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#b-chomped-last%28t%29">b-chomped-last(t)</a></code> <code class="literal"><a class="link" href="#l-chomped-empty%28n,t%29">l-chomped-empty(n,t)</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2797293"></a>8.2.&nbsp;Block Collection Styles</h2>
              </div>
            </div>
          </div>
          <p>
        For readability, <a id="id2797302" class="indexterm"></a><a id="style/block/collection"></a><em class="firstterm">block collections styles</em> are not
        denoted by any <a id="id2797321" class="indexterm"></a><a class="link" href="#indicator//">indicator</a>.
        Instead, YAML uses a lookahead method, where a block collection is
        distinguished from a <a id="id2797335" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalar</a> only when a <a id="id2797353" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pair</a> or a <a id="id2797367" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">sequence entry</a> is seen.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2797382"></a>8.2.1.&nbsp;Block Sequences</h3>
                </div>
              </div>
            </div>
            <p>
          A <a id="id2797390" class="indexterm"></a><a id="style/block/sequence"></a><em class="firstterm">block sequence</em> is simply a series of
          <a id="id2797410" class="indexterm"></a><a class="link" href="#node//">nodes</a>, each denoted by a leading
          <a id="id2797423" class="indexterm"></a><a id="- block sequence entry//"></a><em class="firstterm">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>”
          indicator</em>. The “<span class="quote"><strong class="userinput"><code>-</code></strong></span>” indicator must be
          <a id="id2797450" class="indexterm"></a><a class="link" href="#space/separation/">separated</a>
          from the <a id="id2797466" class="indexterm"></a><a class="link" href="#node//">node</a> by <a id="id2797478" class="indexterm"></a><a class="link" href="#space/white/">white space</a>. This allows
          “<span class="quote"><strong class="userinput"><code>-</code></strong></span>” to be used as the first character in a <a id="id2797502" class="indexterm"></a><a class="link" href="#style/flow/plain">plain
          scalar</a> if followed by a non-space character (e.g.
          “<span class="quote"><strong class="userinput"><code>-1</code></strong></span>”).
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[183]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l+block-sequence(n)"></a>l+block-sequence(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#s-indent%28n%29">s-indent(n+m)</a>
                <a href="#c-l-block-seq-entry%28n%29">c-l-block-seq-entry(n+m)</a> )+<br>
              /* For some fixed auto-detected <code class="varname">m</code> &gt; 0 */
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[184]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-l-block-seq-entry(n)"></a>c-l-block-seq-entry(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-sequence-entry">“<span class="quote">-</span>”</a> /* Not followed by an
                  <a href="#ns-char">ns-char</a> */<br>
              <a href="#s-l+block-indented%28n,c%29">s-l+block-indented(n,block-in)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2797596"></a>
              <p class="title">
                <b>Example&nbsp;8.14.&nbsp;Block Sequence</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">block sequence:<br>··<code class="filename">- one↓</code>
  <code class="filename">- two : three↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-l-block-seq-entry%28n%29">c-l-block-seq-entry(n)</a></code>
  <code class="literal">auto-detected <a class="link" href="#s-indent%28n%29">s-indent(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "block sequence"
  : !!seq [
    !!str "one",
    !!map {
      ? !!str "two"
      : !!str "three"
    },
  ],
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          The entry <a id="id2797686" class="indexterm"></a><a class="link" href="#node//">node</a> may be either
          <a id="id2797699" class="indexterm"></a><a class="link" href="#node/completely%20empty/">completely
          empty</a>, be a nested <a id="id2797715" class="indexterm"></a><a class="link" href="#style/block/">block node</a>, or use a <a id="id2797731" class="indexterm"></a><a id="style/compact block collection/"></a><em class="firstterm">compact in-line
          notation</em>. The compact notation may be used when the entry
          is itself a nested <a id="id2797750" class="indexterm"></a><a class="link" href="#style/block/collection">block collection</a>. In this case, both
          the “<span class="quote"><strong class="userinput"><code>-</code></strong></span>” indicator and the following <a id="id2797775" class="indexterm"></a><a class="link" href="#space//">spaces</a> are considered to be part of the
          <a id="id2797788" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> of the nested <a id="id2797804" class="indexterm"></a><a class="link" href="#style/block/collection">collection</a>. Note that it is not
          possible to specify <a id="id2797823" class="indexterm"></a><a class="link" href="#node/property/">node
          properties</a> for such a <a id="id2797838" class="indexterm"></a><a class="link" href="#style/block/collection">collection</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[185]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-l+block-indented(n,c)"></a>s-l+block-indented(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;( <a href="#s-indent%28n%29">s-indent(m)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;(
                <a href="#ns-l-compact-sequence%28n%29">ns-l-compact-sequence(n+1+m)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;|
                <a href="#ns-l-compact-mapping%28n%29">ns-l-compact-mapping(n+1+m)</a> ) )<br>
              | <a href="#s-l+block-node%28n,c%29">s-l+block-node(n,c)</a><br>
              | ( <a href="#e-node">e-node</a>
                  <a href="#s-l-comments">s-l-comments</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[186]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-l-compact-sequence(n)"></a>ns-l-compact-sequence(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-l-block-seq-entry%28n%29">c-l-block-seq-entry(n)</a><br>
              ( <a href="#s-indent%28n%29">s-indent(n)</a>
              <a href="#c-l-block-seq-entry%28n%29">c-l-block-seq-entry(n)</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2797944"></a>
              <p class="title">
                <b>Example&nbsp;8.15.&nbsp;Block Sequence Entry Types</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">-<code class="filename">° # Empty</code><br>-<code class="literal"> |
 block node</code>
-<span class="property">·- one # Compact
··- two # sequence</span>
-<code class="constant"> one: two # Compact mapping</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename">Empty</code>
  <code class="literal"><a class="link" href="#s-l+block-node%28n,c%29">s-l+block-node(n,c)</a></code>
  <span class="property"><a class="link" href="#ns-l-compact-sequence%28n%29">ns-l-compact-sequence(n)</a></span>
  <code class="constant"><a class="link" href="#ns-l-compact-mapping%28n%29">ns-l-compact-mapping(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!null "",
  !!str "block node\n",
  !!seq [
    !!str "one"
    !!str "two",
  ],
  !!map {
    ? !!str "one"
    : !!str "two",
  },
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2798057"></a>8.2.2.&nbsp;Block Mappings</h3>
                </div>
              </div>
            </div>
            <p>
          A <a id="id2798065" class="indexterm"></a><a id="style/block/mapping"></a><em class="firstterm">Block
          mapping</em> is a series of entries, each <a id="id2798085" class="indexterm"></a><a class="link" href="#present//">presenting</a> a <a id="id2798097" class="indexterm"></a><a class="link" href="#key:%20value%20pair//">key:&nbsp;value pair</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[187]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l+block-mapping(n)"></a>l+block-mapping(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#s-indent%28n%29">s-indent(n+m)</a>
                <a href="#ns-l-block-map-entry%28n%29">ns-l-block-map-entry(n+m)</a> )+<br>
              /* For some fixed auto-detected <code class="varname">m</code> &gt; 0 */
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2798147"></a>
              <p class="title">
                <b>Example&nbsp;8.16.&nbsp;Block Mappings</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">block mapping:<br><code class="literal">·</code><code class="filename">key: value↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-l-block-map-entry%28n%29">ns-l-block-map-entry(n)</a></code>
  <code class="literal">auto-detected <a class="link" href="#s-indent%28n%29">s-indent(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "block mapping"
  : !!map {
    ? !!str "key"
    : !!str "value",
  },
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          If the <a id="id2798235" class="indexterm"></a><a class="link" href="#?%20mapping%20key//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>”</a>
          indicator is specified, the optional value node must be specified on
          a separate line, denoted by the <a id="id2798255" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:</code></strong></span>”</a> indicator. Note that YAML allows
          here the same <a id="id2798273" class="indexterm"></a><a class="link" href="#style/compact%20block%20collection/">compact in-line notation</a> described above for
          <a id="id2798290" class="indexterm"></a><a class="link" href="#style/block/sequence">block
          sequence</a> entries.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[188]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-l-block-map-entry(n)"></a>ns-l-block-map-entry(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;<a href="#c-l-block-map-explicit-entry%28n%29">c-l-block-map-explicit-entry(n)</a><br>
              | <a href="#ns-l-block-map-implicit-entry%28n%29">ns-l-block-map-implicit-entry(n)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[189]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-l-block-map-explicit-entry(n)"></a>c-l-block-map-explicit-entry(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-l-block-map-explicit-key%28n%29">c-l-block-map-explicit-key(n)</a><br>
              ( <a href="#l-block-map-explicit-value%28n%29">l-block-map-explicit-value(n)</a><br>
              | <a href="#e-node">e-node</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[190]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-l-block-map-explicit-key(n)"></a>c-l-block-map-explicit-key(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-mapping-key">“<span class="quote">?</span>”</a>
              <a href="#s-l+block-indented%28n,c%29">s-l+block-indented(n,block-out)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[191]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-block-map-explicit-value(n)"></a>l-block-map-explicit-value(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-indent%28n%29">s-indent(n)</a><br>
              <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
              <a href="#s-l+block-indented%28n,c%29">s-l+block-indented(n,block-out)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2798425"></a>
              <p class="title">
                <b>Example&nbsp;8.17.&nbsp;Explicit Block Mapping Entries</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">? explicit key # Empty value↓</code><span class="property">°</span><br><code class="filename">? |
  block key↓</code>
<code class="literal">:·- one # Explicit compact
··- two # block value↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-l-block-map-explicit-key%28n%29">c-l-block-map-explicit-key(n)</a></code>
  <code class="literal"><a class="link" href="#l-block-map-explicit-value%28n%29">l-block-map-explicit-value(n)</a></code>
  <span class="property"><a class="link" href="#e-node">e-node</a></span>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "explicit key"
  : !!str "",
  ? !!str "block key\n"
  : !!seq [
    !!str "one",
    !!str "two",
  ],
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          If the “<span class="quote"><strong class="userinput"><code>?</code></strong></span>” indicator is omitted, <a id="id2798544" class="indexterm"></a><a class="link" href="#parse//">parsing</a> needs to see past the <a id="id2798557" class="indexterm"></a><a class="link" href="#key/implicit/">implicit key</a>, in the
          same way as in the <a id="id2798573" class="indexterm"></a><a class="link" href="#style/single%20key:value%20pair%20mapping/">single key:&nbsp;value pair</a>
          <a id="id2798591" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow
          mapping</a>. Hence, such <a id="id2798609" class="indexterm"></a><a class="link" href="#key//">keys</a>
          are subject to the same restrictions; they are limited to a single
          line and must not span more than 1024 Unicode characters.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[192]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-l-block-map-implicit-entry(n)"></a>ns-l-block-map-implicit-entry(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#ns-s-block-map-implicit-key">ns-s-block-map-implicit-key</a><br>
              | <a href="#e-node">e-node</a> )<br>
              <a href="#c-l-block-map-implicit-value%28n%29">c-l-block-map-implicit-value(n)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[193]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-s-block-map-implicit-key"></a>ns-s-block-map-implicit-key</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              &nbsp;&nbsp;<a href="#c-s-implicit-json-key%28c%29">c-s-implicit-json-key(block-key)</a><br>
              | <a href="#ns-s-implicit-yaml-key%28c%29">ns-s-implicit-yaml-key(block-key)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <p>
          In this case, the <a id="id2798689" class="indexterm"></a><a class="link" href="#value//">value</a> may be
          specified on the same line as the <a id="id2798703" class="indexterm"></a><a class="link" href="#key/implicit/">implicit key</a>. Note however that in
          block mappings the <a id="id2798719" class="indexterm"></a><a class="link" href="#value//">value</a> must
          never be adjacent to the “<span class="quote"><strong class="userinput"><code>:</code></strong></span>”, as this greatly reduces
          readability and is not required for <a id="id2798739" class="indexterm"></a><a class="link" href="#JSON%20compatibility//">JSON compatibility</a> (unlike the case in
          <a id="id2798754" class="indexterm"></a><a class="link" href="#style/flow/mapping">flow
          mappings</a>).
        </p>
            <p>
          There is no compact notation for in-line <a id="id2798776" class="indexterm"></a><a class="link" href="#value//">values</a>. Also, while both the <a id="id2798788" class="indexterm"></a><a class="link" href="#key/implicit/">implicit key</a> and the
          <a id="id2798804" class="indexterm"></a><a class="link" href="#value//">value</a> following it may be empty,
          the <a id="id2798817" class="indexterm"></a><a class="link" href="#:%20mapping%20value//">“<span class="quote"><strong class="userinput"><code>:</code></strong></span>”</a>
          indicator is mandatory. This prevents a potential ambiguity with
          multi-line <a id="id2798836" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[194]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-l-block-map-implicit-value(n)"></a>c-l-block-map-implicit-value(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-mapping-value">“<span class="quote">:</span>”</a>
              ( <a href="#s-l+block-node%28n,c%29">s-l+block-node(n,block-out)</a><br>
              &nbsp;&nbsp;&nbsp;&nbsp;| ( <a href="#e-node">e-node</a>
                <a href="#s-l-comments">s-l-comments</a> ) )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2798896"></a>
              <p class="title">
                <b>Example&nbsp;8.18.&nbsp;Implicit Block Mapping Entries</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">plain key</code><code class="literal">: in-line value</code><br><code class="filename">°</code><code class="literal">:° # Both empty</code>
<code class="filename">"quoted key"</code><code class="literal">:
- entry</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-s-block-map-implicit-key">ns-s-block-map-implicit-key</a></code>
  <code class="literal"><a class="link" href="#c-l-block-map-implicit-value%28n%29">c-l-block-map-implicit-value(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "plain key"
  : !!str "in-line value",
  ? !!null ""
  : !!null "",
  ? !!str "quoted key"
  : !!seq [ !!str "entry" ],
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          A <a id="id2799004" class="indexterm"></a><a class="link" href="#style/compact%20block%20collection/">compact in-line notation</a> is also available.
          This compact notation may be nested inside <a id="id2799022" class="indexterm"></a><a class="link" href="#style/block/sequence">block sequences</a> and
          explicit block mapping entries. Note that it is not possible to
          specify <a id="id2799042" class="indexterm"></a><a class="link" href="#node/property/">node
          properties</a> for such a nested mapping.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[195]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="ns-l-compact-mapping(n)"></a>ns-l-compact-mapping(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#ns-l-block-map-entry%28n%29">ns-l-block-map-entry(n)</a><br>
              ( <a href="#s-indent%28n%29">s-indent(n)</a>
              <a href="#ns-l-block-map-entry%28n%29">ns-l-block-map-entry(n)</a> )*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2799091"></a>
              <p class="title">
                <b>Example&nbsp;8.19.&nbsp;Compact Block Mappings</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">- <code class="filename">sun: yellow↓</code><br>- <span class="honorific"><code class="filename">? <code class="filename">earth: blue↓</code>
  : <code class="filename">moon: white↓</code></code></span>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#ns-l-compact-mapping%28n%29">ns-l-compact-mapping(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!map {
     !!str "sun" : !!str "yellow",
  },
  !!map {
    ? !!map {
      ? !!str "earth"
      : !!str "blue"
    },
    : !!map {
      ? !!str "moon"
      : !!str "white"
    },
  }
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2799181"></a>8.2.3.&nbsp;Block Nodes</h3>
                </div>
              </div>
            </div>
            <p>
          YAML allows <a id="id2799189" class="indexterm"></a><a class="link" href="#style/flow/">flow
          nodes</a> to be embedded inside <a id="id2799205" class="indexterm"></a><a class="link" href="#style/block/collection">block collections</a>
          (but not vice-versa). <a id="id2799223" class="indexterm"></a><a class="link" href="#style/flow/">Flow
          nodes</a> must be <a id="id2799238" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> by at least one more
          <a id="id2799254" class="indexterm"></a><a class="link" href="#space//">space</a> than the parent <a id="id2799266" class="indexterm"></a><a class="link" href="#style/block/collection">block
          collection</a>. Note that <a id="id2799285" class="indexterm"></a><a class="link" href="#style/flow/">flow nodes</a> may begin on a following line.
        </p>
            <p>
          It is at this point that <a id="id2799304" class="indexterm"></a><a class="link" href="#parse//">parsing</a>
          needs to distinguish between a <a id="id2799318" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalar</a> and an
          <a id="id2799336" class="indexterm"></a><a class="link" href="#key/implicit/">implicit key</a>
          starting a nested <a id="id2799351" class="indexterm"></a><a class="link" href="#style/block/mapping">block mapping</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[196]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-l+block-node(n,c)"></a>s-l+block-node(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-l+block-in-block%28n,c%29">s-l+block-in-block(n,c)</a>
              | <a href="#s-l+flow-in-block%28n%29">s-l+flow-in-block(n)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[197]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-l+flow-in-block(n)"></a>s-l+flow-in-block(n)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-separate%28n,c%29">s-separate(n+1,flow-out)</a><br>
              <a href="#ns-flow-node%28n,c%29">ns-flow-node(n+1,flow-out)</a>
              <a href="#s-l-comments">s-l-comments</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2799426"></a>
              <p class="title">
                <b>Example&nbsp;8.20.&nbsp;Block Node Types</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">-<code class="filename">↓<br>··"flow in block"↓</code>
-·<code class="literal">&gt;
 Block scalar↓</code>
-·<code class="literal">!!map # Block collection
  foo : bar↓</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#s-l+flow-in-block%28n%29">s-l+flow-in-block(n)</a></code>
  <code class="literal"><a class="link" href="#s-l+block-in-block%28n,c%29">s-l+block-in-block(n,c)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!seq [
  !!str "flow in block",
  !!str "Block scalar\n",
  !!map {
    ? !!str "foo"
    : !!str "bar",
  },
]
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          The block <a id="id2799524" class="indexterm"></a><a class="link" href="#node/property/">node’s
          properties</a> may span across several lines. In this case,
          they must be <a id="id2799542" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> by at least one more
          <a id="id2799557" class="indexterm"></a><a class="link" href="#space//">space</a> than the <a id="id2799570" class="indexterm"></a><a class="link" href="#style/block/collection">block
          collection</a>, regardless of the <a id="id2799588" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a> of the <a id="id2799604" class="indexterm"></a><a class="link" href="#style/block/collection">block
          collection</a> entries.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[198]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-l+block-in-block(n,c)"></a>s-l+block-in-block(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-l+block-scalar%28n,c%29">s-l+block-scalar(n,c)</a>
              | <a href="#s-l+block-collection%28n,c%29">s-l+block-collection(n,c)</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[199]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-l+block-scalar(n,c)"></a>s-l+block-scalar(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-separate%28n,c%29">s-separate(n+1,c)</a><br>
              ( <a href="#c-ns-properties%28n,c%29">c-ns-properties(n+1,c)</a>
              <a href="#s-separate%28n,c%29">s-separate(n+1,c)</a> )?<br>
              ( <a href="#c-l+literal%28n%29">c-l+literal(n)</a>
              | <a href="#c-l+folded%28n%29">c-l+folded(n)</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2799693"></a>
              <p class="title">
                <b>Example&nbsp;8.21.&nbsp;Block Scalar Nodes</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">literal: <code class="filename">|2<br>··value</code>
folded:<code class="literal">↓
···!foo
··&gt;1
·value</code>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-l+literal%28n%29">c-l+literal(n)</a></code> <code class="literal"><a class="link" href="#c-l+folded%28n%29">c-l+folded(n)</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "literal"
  : !!str "value",
  ? !!str "folded"
  : !&lt;!foo&gt; "value",
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
            <p>
          Since people perceive the <a id="id2799784" class="indexterm"></a><a class="link" href="#-%20block%20sequence%20entry//">“<span class="quote"><strong class="userinput"><code>-</code></strong></span>” indicator</a> as <a id="id2799803" class="indexterm"></a><a class="link" href="#space/indentation/">indentation</a>, nested
          <a id="id2799819" class="indexterm"></a><a class="link" href="#style/block/sequence">block
          sequences</a> may be <a id="id2799837" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> by one less <a id="id2799852" class="indexterm"></a><a class="link" href="#space//">space</a> to compensate, except, of course, if
          nested inside another <a id="id2799866" class="indexterm"></a><a class="link" href="#style/block/sequence">block sequence</a> (<a id="id2799884" class="indexterm"></a><a class="link" href="#context/block-out/"><strong class="userinput"><code>block-out</code></strong>
          context</a> vs. <a id="id2799905" class="indexterm"></a><a class="link" href="#context/block-in/"><strong class="userinput"><code>block-in</code></strong>
          context</a>).
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[200]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="s-l+block-collection(n,c)"></a>s-l+block-collection(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              ( <a href="#s-separate%28n,c%29">s-separate(n+1,c)</a>
              <a href="#c-ns-properties%28n,c%29">c-ns-properties(n+1,c)</a> )?<br>
              <a href="#s-l-comments">s-l-comments</a><br>
              ( <a href="#l+block-sequence%28n%29">l+block-sequence(</a><a href="#seq-spaces%28n,c%29">seq-spaces(n,c)</a><a href="#l+block-sequence%28n%29">)</a><br>
              | <a href="#l+block-mapping%28n%29">l+block-mapping(n)</a> )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[201]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="seq-spaces(n,c)"></a>seq-spaces(n,c)</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <code class="varname">c</code> = block-out ⇒ n-1<br>
              <code class="varname">c</code> = block-in&nbsp; ⇒ n
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2800008"></a>
              <p class="title">
                <b>Example&nbsp;8.22.&nbsp;Block Collection Nodes</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">sequence:<span class="honorific"><span class="property"> !!seq<br><code class="filename">- entry
- !!seq
 - nested</code></span></span>
mapping:<span class="honorific"><span class="property"> !!map
<code class="literal"> foo: bar</code></span></span>
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#l+block-sequence%28n%29">l+block-sequence(n)</a></code>
  <code class="literal"><a class="link" href="#l+block-mapping%28n%29">l+block-mapping(n)</a></code>
  <span class="property"><a class="link" href="#s-l+block-collection%28n,c%29">s-l+block-collection(n,c)</a></span>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  ? !!str "sequence"
  : !!seq [
    !!str "entry",
    !!seq [ !!str "nested" ],
  ],
  ? !!str "mapping"
  : !!map {
    ? !!str "foo" : !!str "bar",
  },
}
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="YAML"></a>Chapter&nbsp;9.&nbsp;YAML Character Stream</h2>
            </div>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2800132"></a>9.1.&nbsp;Documents</h2>
              </div>
            </div>
          </div>
          <p>
        A YAML character <a id="id2800140" class="indexterm"></a><a class="link" href="#stream//">stream</a> may contain
        several <a id="id2800153" class="indexterm"></a><a id="document//"></a><em class="firstterm">documents</em>. Each document
        is completely independent from the rest.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2800168"></a>9.1.1.&nbsp;Document Prefix</h3>
                </div>
              </div>
            </div>
            <p>
          A document may be preceded by a <a id="id2800177" class="indexterm"></a><a id="/prefix/"></a><em class="firstterm">prefix</em> specifying the <a id="id2800192" class="indexterm"></a><a class="link" href="#character%20encoding//">character encoding</a>, and
          optional <a id="id2800207" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines. Note
          that all <a id="id2800220" class="indexterm"></a><a class="link" href="#document//">documents</a> in a stream
          must use the same <a id="id2800233" class="indexterm"></a><a class="link" href="#character%20encoding//">character
          encoding</a>. However it is valid to re-specify the <a id="id2800248" class="indexterm"></a><a class="link" href="#character%20encoding//">encoding</a> using a <a id="id2800261" class="indexterm"></a><a class="link" href="#byte%20order%20mark//">byte order mark</a> for each <a id="id2800275" class="indexterm"></a><a class="link" href="#document//">document</a> in the stream. This makes it
          easier to concatenate streams.
        </p>
            <p>
          The existence of the optional prefix does not necessarily indicate
          the existence of an actual <a id="id2800294" class="indexterm"></a><a class="link" href="#document//">document</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[202]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-document-prefix"></a>l-document-prefix</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-byte-order-mark">c-byte-order-mark</a>?
              <a href="#l-comment">l-comment</a>*
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2800333"></a>
              <p class="title">
                <b>Example&nbsp;9.1.&nbsp;Document Prefix</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">⇔# Comment<br># lines</code>
Document
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#l-document-prefix">l-document-prefix</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "Document"
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2800401"></a>9.1.2.&nbsp;Document Markers</h3>
                </div>
              </div>
            </div>
            <p>
          Using <a id="id2800409" class="indexterm"></a><a class="link" href="#directive//">directives</a> creates a
          potential ambiguity. It is valid to have a <a id="id2800422" class="indexterm"></a><a class="link" href="#%%20directive//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a> character at the start of a
          line (e.g. as the first character of the second line of a <a id="id2800442" class="indexterm"></a><a class="link" href="#style/flow/plain">plain
          scalar</a>). How, then, to distinguish between an actual
          <a id="id2800461" class="indexterm"></a><a class="link" href="#directive//">directive</a> and a <a id="id2800473" class="indexterm"></a><a class="link" href="#content//">content</a> line that happens to start with a
          <a id="id2800486" class="indexterm"></a><a class="link" href="#%%20directive//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a>
          character?
        </p>
            <p>
          The solution is the use of two special <a id="id2800508" class="indexterm"></a><a id="marker//"></a><em class="firstterm">marker</em> lines to control the processing of
          <a id="id2800522" class="indexterm"></a><a class="link" href="#directive//">directives</a>, one at the start
          of a <a id="id2800535" class="indexterm"></a><a class="link" href="#document//">document</a> and one at the
          end.
        </p>
            <p>
          At the start of a <a id="id2800552" class="indexterm"></a><a class="link" href="#document//">document</a>,
          lines beginning with a <a id="id2800565" class="indexterm"></a><a class="link" href="#%%20directive//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a> character are assumed to be
          <a id="id2800584" class="indexterm"></a><a class="link" href="#directive//">directives</a>. The (possibly
          empty) list of <a id="id2800596" class="indexterm"></a><a class="link" href="#directive//">directives</a> is
          terminated by a <a id="id2800610" class="indexterm"></a><a id="marker/directives end/"></a><em class="firstterm">directives end marker</em> line. Lines following this
          marker can safely use <a id="id2800629" class="indexterm"></a><a class="link" href="#%%20directive//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a> as the first character.
        </p>
            <p>
          At the end of a <a id="id2800650" class="indexterm"></a><a class="link" href="#document//">document</a>, a
          <a id="id2800662" class="indexterm"></a><a id="marker/document end/"></a><em class="firstterm">document end
          marker</em> line is used to signal the <a id="id2800681" class="indexterm"></a><a class="link" href="#parse//">parser</a> to begin scanning for <a id="id2800693" class="indexterm"></a><a class="link" href="#directive//">directives</a> again.
        </p>
            <p>
          The existence of this optional <a id="id2800710" class="indexterm"></a><a id="document/suffix/"></a><em class="firstterm">document suffix</em> does not necessarily
          indicate the existence of an actual following <a id="id2800729" class="indexterm"></a><a class="link" href="#document//">document</a>.
        </p>
            <p>
          Obviously, the actual <a id="id2800745" class="indexterm"></a><a class="link" href="#content//">content</a>
          lines are therefore forbidden to begin with either of these markers.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[203]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-directives-end"></a>c-directives-end</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              “<span class="quote">-</span>” “<span class="quote">-</span>” “<span class="quote">-</span>”
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[204]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-document-end"></a>c-document-end</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              “<span class="quote">.</span>” “<span class="quote">.</span>” “<span class="quote">.</span>”
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[205]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-document-suffix"></a>l-document-suffix</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-document-end">c-document-end</a>
              <a href="#s-l-comments">s-l-comments</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                    <tr>
                      <td class="productioncounter" valign="top" align="left">[206]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="c-forbidden"></a>c-forbidden</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              /* Start of line */<br>
              ( <a href="#c-directives-end">c-directives-end</a>
              | <a href="#c-document-end">c-document-end</a> )<br>
              ( <a href="#b-char">b-char</a>
              | <a href="#s-white">s-white</a>
              | /* End of file */ )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2800866"></a>
              <p class="title">
                <b>Example&nbsp;9.2.&nbsp;Document Markers</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2
<code class="filename">---</code>
Document
<span class="honorific"><span class="property"><code class="literal">...</code> # Suffix</span></span>
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "Document"
</span></pre>
<pre class="synopsis">Legend:
  <code class="filename"><a class="link" href="#c-directives-end">c-directives-end</a></code> <code class="literal"><a class="link" href="#c-document-end">c-document-end</a></code>
  <span class="property"><a class="link" href="#l-document-suffix">l-document-suffix</a></span>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2800967"></a>9.1.3.&nbsp;Bare Documents</h3>
                </div>
              </div>
            </div>
            <p>
          A <a id="id2800975" class="indexterm"></a><a id="document/bare/"></a><em class="firstterm">bare
          document</em> does not begin with any <a id="id2800992" class="indexterm"></a><a class="link" href="#directive//">directives</a> or <a id="id2801005" class="indexterm"></a><a class="link" href="#marker//">marker</a> lines. Such documents are very
          “<span class="quote">clean</span>” as they contain nothing other than the <a id="id2801022" class="indexterm"></a><a class="link" href="#content//">content</a>. In this case, the first
          non-comment line may not start with a <a id="id2801036" class="indexterm"></a><a class="link" href="#%%20directive//">“<span class="quote"><strong class="userinput"><code>%</code></strong></span>”</a> first character.
        </p>
            <p>
          Document <a id="id2801058" class="indexterm"></a><a class="link" href="#node//">nodes</a> are <a id="id2801070" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> as if they
          have a parent <a id="id2801086" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> at -1 <a id="id2801102" class="indexterm"></a><a class="link" href="#space//">spaces</a>. Since a <a id="id2801114" class="indexterm"></a><a class="link" href="#node//">node</a> must be more <a id="id2801127" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> than its parent <a id="id2801142" class="indexterm"></a><a class="link" href="#node//">node</a>, this allows the document’s <a id="id2801156" class="indexterm"></a><a class="link" href="#node//">node</a> to be <a id="id2801168" class="indexterm"></a><a class="link" href="#space/indentation/">indented</a> at zero or more <a id="id2801184" class="indexterm"></a><a class="link" href="#space//">spaces</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[207]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-bare-document"></a>l-bare-document</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#s-l+block-node%28n,c%29">s-l+block-node(-1,block-in)</a><br>
              /* Excluding <a href="#c-forbidden">c-forbidden</a> content */
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2801226"></a>
              <p class="title">
                <b>Example&nbsp;9.3.&nbsp;Bare Documents</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">Bare<br>document</code>
...
# No document
...
<code class="filename">|
%!PS-Adobe-2.0 # Not the first line</code>
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "Bare document"
%YAML 1.2
---
!!str "%!PS-Adobe-2.0\n"
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#l-bare-document">l-bare-document</a></code>
</pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2801301"></a>9.1.4.&nbsp;Explicit Documents</h3>
                </div>
              </div>
            </div>
            <p>
          An <a id="id2801309" class="indexterm"></a><a id="document/explicit/"></a><em class="firstterm">explicit
          document</em> begins with an explicit <a id="id2801326" class="indexterm"></a><a class="link" href="#marker/directives%20end/">directives end marker</a> line but
          no <a id="id2801342" class="indexterm"></a><a class="link" href="#directive//">directives</a>. Since the
          existence of the <a id="id2801355" class="indexterm"></a><a class="link" href="#document//">document</a> is
          indicated by this <a id="id2801368" class="indexterm"></a><a class="link" href="#marker//">marker</a>, the
          <a id="id2801381" class="indexterm"></a><a class="link" href="#document//">document</a> itself may be <a id="id2801394" class="indexterm"></a><a class="link" href="#node/completely%20empty/">completely
          empty</a>.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[208]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-explicit-document"></a>l-explicit-document</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#c-directives-end">c-directives-end</a><br>
              ( <a href="#l-bare-document">l-bare-document</a><br>
              | ( <a href="#e-node">e-node</a>
                <a href="#s-l-comments">s-l-comments</a> ) )
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2801448"></a>
              <p class="title">
                <b>Example&nbsp;9.4.&nbsp;Explicit Documents</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">---<br>{ matches
% : 20 }</code>
...
<code class="filename">---
# Empty</code>
...
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#l-explicit-document">l-explicit-document</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  !!str "matches %": !!int "20"
}
...
%YAML 1.2
---
!!null ""
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2801522"></a>9.1.5.&nbsp;Directives Documents</h3>
                </div>
              </div>
            </div>
            <p>
          A <a id="id2801531" class="indexterm"></a><a id="document/directives/"></a><em class="firstterm">directives
          document</em> begins with some <a id="id2801549" class="indexterm"></a><a class="link" href="#directive//">directives</a> followed by an explicit
          <a id="id2801562" class="indexterm"></a><a class="link" href="#marker/directives%20end/">directives end
          marker</a> line.
        </p>
            <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
              <tbody><tr>
                <td width="50%">
                  <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                    <tbody><tr>
                      <td class="productioncounter" valign="top" align="left">[209]</td>
                      <td class="productionlhs" valign="top" align="right"><a id="l-directive-document"></a>l-directive-document</td>
                      <td class="productionseperator" valign="top" align="center">
                        <code>::=</code>
                      </td>
                      <td class="productionrhs" valign="top">
              <a href="#l-directive">l-directive</a>+<br>
              <a href="#l-explicit-document">l-explicit-document</a>
            </td>
                      <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                    </tr>
                  </tbody></table>
                </td>
              </tr>
            </tbody></table>
            <div class="example">
              <a id="id2801606"></a>
              <p class="title">
                <b>Example&nbsp;9.5.&nbsp;Directives Documents</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">%YAML 1.2<br>--- |
%!PS-Adobe-2.0</code>
...
<code class="filename">%YAML1.2
---
# Empty</code>
...
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#l-explicit-document">l-explicit-document</a></code>
</pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "%!PS-Adobe-2.0\n"
...
%YAML 1.2
---
!!null ""
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2801681"></a>9.2.&nbsp;Streams</h2>
              </div>
            </div>
          </div>
          <p>
        A YAML <a id="id2801689" class="indexterm"></a><a id="stream//"></a><em class="firstterm">stream</em> consists of zero or
        more <a id="id2801704" class="indexterm"></a><a class="link" href="#document//">documents</a>. Subsequent
        <a id="id2801716" class="indexterm"></a><a class="link" href="#document//">documents</a> require some sort of
        separation <a id="id2801730" class="indexterm"></a><a class="link" href="#marker//">marker</a> line. If a
        <a id="id2801743" class="indexterm"></a><a class="link" href="#document//">document</a> is not terminated by a
        <a id="id2801756" class="indexterm"></a><a class="link" href="#marker/document%20end/">document end
        marker</a> line, then the following <a id="id2801772" class="indexterm"></a><a class="link" href="#document//">document</a> must begin with a <a id="id2801785" class="indexterm"></a><a class="link" href="#marker/directives%20end/">directives end
        marker</a> line.
      </p>
          <p>
        The stream format is intentionally “<span class="quote">sloppy</span>” to better
        support common use cases, such as stream concatenation.
      </p>
          <table class="productionset" summary="EBNF" width="100%" cellpadding="5">
            <tbody><tr>
              <td width="50%">
                <table class="productionset" summary="EBNF productions" width="99%" border="0" cellpadding="0">
                  <tbody><tr>
                    <td class="productioncounter" valign="top" align="left">[210]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="l-any-document"></a>l-any-document</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            &nbsp;&nbsp;<a href="#l-directive-document">l-directive-document</a><br>
            | <a href="#l-explicit-document">l-explicit-document</a><br>
            | <a href="#l-bare-document">l-bare-document</a>
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="productioncounter" valign="top" align="left">[211]</td>
                    <td class="productionlhs" valign="top" align="right"><a id="l-yaml-stream"></a>l-yaml-stream</td>
                    <td class="productionseperator" valign="top" align="center">
                      <code>::=</code>
                    </td>
                    <td class="productionrhs" valign="top">
            <a href="#l-document-prefix">l-document-prefix</a>*
            <a href="#l-any-document">l-any-document</a>?<br>
            ( <a href="#l-document-suffix">l-document-suffix</a>+
            <a href="#l-document-prefix">l-document-prefix</a>*
            <a href="#l-any-document">l-any-document</a>?<br>
            | <a href="#l-document-prefix">l-document-prefix</a>*
            <a href="#l-explicit-document">l-explicit-document</a>? )*
          </td>
                    <td class="productioncomment" valign="top" align="left">&nbsp;</td>
                  </tr>
                </tbody></table>
              </td>
            </tr>
          </tbody></table>
          <div class="example">
            <a id="id2801896"></a>
            <p class="title">
              <b>Example&nbsp;9.6.&nbsp;Stream</b>
            </p>
            <div class="example-contents">
              <table class="simplelist" summary="Simple list" border="0">
                <tbody><tr>
                  <td width="50%">
<pre class="programlisting"><span class="database"><code class="filename">Document</code><br><code class="filename">---
# Empty</code>
...
<span class="property">%YAML 1.2
---
matches %: 20</span>
</span></pre>
<pre class="synopsis">&nbsp;Legend:
   <code class="filename"><a class="link" href="#l-any-document">l-any-document</a></code>
   <code class="literal"><a class="link" href="#l-document-suffix">l-document-suffix</a></code>
   <span class="property"><a class="link" href="#l-explicit-document">l-explicit-document</a></span>
</pre>
            </td>
                  <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!str "Document"
...
%YAML 1.2
---
!!null ""
...
%YAML 1.2
---
!!map {
  !!str "matches %": !!int "20"
}
</span></pre>
            </td>
                </tr>
              </tbody></table>
            </div>
          </div>
          <br class="example-break">
          <p>
        A sequence of bytes is a <a id="id2801997" class="indexterm"></a><a id="stream/well-formed/"></a><em class="firstterm">well-formed stream</em> if, taken as a
        whole, it complies with the above <strong class="userinput"><code>l-yaml-stream</code></strong>
        production.
      </p>
          <p>
        Some common use case that can take advantage of the YAML stream
        structure are:
      </p>
          <div class="variablelist">
            <dl>
              <dt>
                <span class="term">Appending to Streams</span>
              </dt>
              <dd>
            Allowing multiple <a id="id2802038" class="indexterm"></a><a class="link" href="#document//">documents</a>
            in a single stream makes YAML suitable for log files and similar
            <a id="id2802052" class="indexterm"></a><a class="link" href="#application//">applications</a>. Note that
            each <a id="id2802066" class="indexterm"></a><a class="link" href="#document//">document</a> is independent
            of the rest, allowing for heterogeneous log file entries.
          </dd>
              <dt>
                <span class="term">Concatenating Streams</span>
              </dt>
              <dd>
                <p>
              Concatenating two YAML streams requires both to use the same
              <a id="id2802094" class="indexterm"></a><a class="link" href="#character%20encoding//">character
              encoding</a>. In addition, it is necessary to separate the
              last <a id="id2802109" class="indexterm"></a><a class="link" href="#document//">document</a> of the first
              stream and the first <a id="id2802122" class="indexterm"></a><a class="link" href="#document//">document</a> of the second stream. This
              is easily ensured by inserting a <a id="id2802136" class="indexterm"></a><a class="link" href="#marker/document%20end/">document end marker</a> between
              the two streams. Note that this is safe regardless of the content
              of either stream. In particular, either or both may be empty, and
              the first stream may or may not already contain such a marker.
            </p>
              </dd>
              <dt>
                <span class="term">Communication Streams</span>
              </dt>
              <dd>
                <p>
              The <a id="id2802169" class="indexterm"></a><a class="link" href="#marker/document%20end/">document
              end marker</a> allows signaling the end of a <a id="id2802186" class="indexterm"></a><a class="link" href="#document//">document</a> without closing the stream
              or starting the next <a id="id2802200" class="indexterm"></a><a class="link" href="#document//">document</a>. This allows the receiver
              to complete processing a <a id="id2802213" class="indexterm"></a><a class="link" href="#document//">document</a> without having to wait for
              the next one to arrive. The sender may also transmit "keep-alive"
              messages in the form of <a id="id2802228" class="indexterm"></a><a class="link" href="#comment//">comment</a> lines or repeated <a id="id2802241" class="indexterm"></a><a class="link" href="#marker/document%20end/">document end
              markers</a> without signalling the start of the next
              <a id="id2802258" class="indexterm"></a><a class="link" href="#document//">document</a>.
            </p>
              </dd>
            </dl>
          </div>
        </div>
      </div>
      <div class="chapter" xml:lang="en" lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="Schema"></a>Chapter&nbsp;10.&nbsp;Recommended Schemas</h2>
            </div>
          </div>
        </div>
        <p>
      A YAML <a id="id2802288" class="indexterm"></a><a id="schema//"></a><em class="firstterm">schema</em> is a combination of a
      set of <a id="id2802303" class="indexterm"></a><a class="link" href="#tag//">tags</a> and a mechanism for <a id="id2802315" class="indexterm"></a><a class="link" href="#tag/resolution/">resolving</a> <a id="id2802330" class="indexterm"></a><a class="link" href="#tag/non-specific/">non-specific tags</a>.
    </p>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2802346"></a>10.1.&nbsp;Failsafe Schema</h2>
              </div>
            </div>
          </div>
          <p>
        The <a id="id2802355" class="indexterm"></a><a id="schema/failsafe/"></a><em class="firstterm">failsafe
        schema</em> is guaranteed to work with any YAML <a id="id2802372" class="indexterm"></a><a class="link" href="#document//">document</a>. It is therefore the recommended
        <a id="id2802385" class="indexterm"></a><a class="link" href="#schema//">schema</a> for generic YAML tools. A
        YAML <a id="id2802399" class="indexterm"></a><a class="link" href="#processor//">processor</a> should therefore
        support this <a id="id2802412" class="indexterm"></a><a class="link" href="#schema//">schema</a>, at least as an
        option.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2802427"></a>10.1.1.&nbsp;Tags</h3>
                </div>
              </div>
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2802432"></a>10.1.1.1.&nbsp;<a id="id2802436" class="indexterm"></a><a id="tag/repository/map"></a><em class="firstterm"></em>Generic Mapping</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:map</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2802492" class="indexterm"></a><a class="link" href="#mapping//">Mapping</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2802522" class="indexterm"></a><a class="link" href="#represent//">Represents</a> an
                  associative container, where each <a id="id2802535" class="indexterm"></a><a class="link" href="#key//">key</a> is unique in the association and
                  mapped to exactly one <a id="id2802549" class="indexterm"></a><a class="link" href="#value//">value</a>.  YAML places no restrictions
                  on the type of <a id="id2802562" class="indexterm"></a><a class="link" href="#key//">keys</a>; in
                  particular, they are not restricted to being <a id="id2802576" class="indexterm"></a><a class="link" href="#scalar//">scalars</a>. Example <a id="id2802588" class="indexterm"></a><a class="link" href="#construct//">bindings</a> to <a id="id2802601" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a> types
                  include Perl’s hash, Python’s dictionary, and Java’s
                  Hashtable.
                </p>
                  </dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2802623"></a>
                <p class="title">
                  <b>Example&nbsp;10.1.&nbsp;<code class="userinput">!!map</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">Block style: !!map<br>  Clark : Evans
  Ingy  : döt Net
  Oren  : Ben-Kiki

Flow style: !!map { Clark: Evans, Ingy: döt Net, Oren: Ben-Kiki }
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2802662"></a>10.1.1.2.&nbsp;<a id="id2802665" class="indexterm"></a><a id="tag/repository/seq"></a><em class="firstterm"></em>Generic Sequence</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2802722" class="indexterm"></a><a class="link" href="#sequence//">Sequence</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2802752" class="indexterm"></a><a class="link" href="#represent//">Represents</a> a
                  collection indexed by sequential integers starting with zero.
                  Example <a id="id2802766" class="indexterm"></a><a class="link" href="#construct//">bindings</a> to
                  <a id="id2802779" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a>
                  types include Perl’s array, Python’s list or tuple, and
                  Java’s array or Vector.
                </p>
                  </dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2802802"></a>
                <p class="title">
                  <b>Example&nbsp;10.2.&nbsp;<code class="userinput">!!seq</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">Block style: !!seq<br>- Clark Evans
- Ingy döt Net
- Oren Ben-Kiki

Flow style: !!seq [ Clark Evans, Ingy döt Net, Oren Ben-Kiki ]
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2802842"></a>10.1.1.3.&nbsp;<a id="id2802845" class="indexterm"></a><a id="tag/repository/str"></a><em class="firstterm"></em>Generic String</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:str</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2802901" class="indexterm"></a><a class="link" href="#scalar//">Scalar</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2802931" class="indexterm"></a><a class="link" href="#represent//">Represents</a> a Unicode
                  string, a sequence of zero or more Unicode characters. This
                  type is usually <a id="id2802946" class="indexterm"></a><a class="link" href="#construct//">bound</a>
                  to the <a id="id2802959" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a> language’s string type, or,
                  for languages lacking one (such as C), to a character array.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Canonical Form:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  The obvious.
                </p>
                  </dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2803000"></a>
                <p class="title">
                  <b>Example&nbsp;10.3.&nbsp;<code class="userinput">!!str</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">Block style: !!str |-<br>  String: just a theory.

Flow style: !!str "String: just a theory."
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2803036"></a>10.1.2.&nbsp;Tag Resolution</h3>
                </div>
              </div>
            </div>
            <p>
          All <a id="id2803044" class="indexterm"></a><a class="link" href="#node//">nodes</a> with the <a id="id2803057" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20non-specific%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>” non-specific tag</a> are <a id="id2803079" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a>, by the
          standard <a id="id2803094" class="indexterm"></a><a class="link" href="#tag/resolution/convention">convention</a>, to
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>”,
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>”, or
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:str</code></strong></span>”, according to their <a id="id2803134" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
        </p>
            <p>
          All <a id="id2803151" class="indexterm"></a><a class="link" href="#node//">nodes</a> with the <a id="id2803163" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific
          tag</a> are left <a id="id2803182" class="indexterm"></a><a class="link" href="#tag/resolution/">unresolved</a>. This constrains the
          <a id="id2803198" class="indexterm"></a><a class="link" href="#application//">application</a> to deal with  a
          <a id="id2803212" class="indexterm"></a><a class="link" href="#representation/partial/">partial
          representation</a>.
        </p>
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2803231"></a>10.2.&nbsp;JSON Schema</h2>
              </div>
            </div>
          </div>
          <p>
        The <a id="id2803239" class="indexterm"></a><a id="schema/JSON/"></a><em class="firstterm">JSON schema</em> is
        the lowest common denominator of most modern computer languages, and
        allows <a id="id2803257" class="indexterm"></a><a class="link" href="#parse//">parsing</a> JSON files. A YAML
        <a id="id2803269" class="indexterm"></a><a class="link" href="#processor//">processor</a> should therefore
        support this <a id="id2803283" class="indexterm"></a><a class="link" href="#schema//">schema</a>, at least as an
        option. It is also strongly recommended that other <a id="id2803296" class="indexterm"></a><a class="link" href="#schema//">schemas</a> should be based on it.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2803311"></a>10.2.1.&nbsp;Tags</h3>
                </div>
              </div>
            </div>
            <p>
          The JSON <a id="id2803319" class="indexterm"></a><a class="link" href="#schema//">schema</a> uses the
          following <a id="id2803332" class="indexterm"></a><a class="link" href="#tag//">tags</a> in addition to those
          defined by the <a id="id2803345" class="indexterm"></a><a class="link" href="#schema/failsafe/">failsafe</a> schema:
        </p>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2803362"></a>10.2.1.1.&nbsp;<a id="id2803365" class="indexterm"></a><a id="tag/repository/null"></a><em class="firstterm"></em>Null</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:null</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2803422" class="indexterm"></a><a class="link" href="#scalar//">Scalar</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2803452" class="indexterm"></a><a class="link" href="#represent//">Represents</a> the lack
                  of a value. This is typically <a id="id2803465" class="indexterm"></a><a class="link" href="#construct//">bound</a> to a <a id="id2803478" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a> null-like
                  value (e.g., <strong class="userinput"><code>undef</code></strong> in Perl,
                  <strong class="userinput"><code>None</code></strong> in Python). Note that a null is
                  different from an empty string. Also, a <a id="id2803506" class="indexterm"></a><a class="link" href="#mapping//">mapping</a> entry with some
                  <a id="id2803519" class="indexterm"></a><a class="link" href="#key//">key</a> and a null <a id="id2803532" class="indexterm"></a><a class="link" href="#value//">value</a> is valid, and different
                  from not having that <a id="id2803545" class="indexterm"></a><a class="link" href="#key//">key</a>
                  in the <a id="id2803557" class="indexterm"></a><a class="link" href="#mapping//">mapping</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Canonical Form:
                </p>
              </span>
                  </dt>
                  <dd><strong class="userinput"><code>null</code></strong>.
              </dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2803594"></a>
                <p class="title">
                  <b>Example&nbsp;10.4.&nbsp;<code class="userinput">!!null</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">!!null null: value for null key<br>key with null value: !!null null
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2803629"></a>10.2.1.2.&nbsp;<a id="id2803632" class="indexterm"></a><a id="tag/repository/bool"></a><em class="firstterm"></em>Boolean</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:bool</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2803690" class="indexterm"></a><a class="link" href="#scalar//">Scalar</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2803719" class="indexterm"></a><a class="link" href="#represent//">Represents</a> a
                  true/false value. In languages without a <a id="id2803733" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a> Boolean type
                  (such as C), is usually <a id="id2803748" class="indexterm"></a><a class="link" href="#construct//">bound</a> to a native integer
                  type, using one for true and zero for false.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Canonical Form:
                </p>
              </span>
                  </dt>
                  <dd>
                Either <strong class="userinput"><code>true</code></strong> or
                <strong class="userinput"><code>false</code></strong>.
              </dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2803792"></a>
                <p class="title">
                  <b>Example&nbsp;10.5.&nbsp;<code class="userinput">!!bool</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">YAML is a superset of JSON: !!bool true<br>Pluto is a planet: !!bool false
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2803828"></a>10.2.1.3.&nbsp;<a id="id2803831" class="indexterm"></a><a id="tag/repository/int"></a><em class="firstterm"></em>Integer</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:int</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2803888" class="indexterm"></a><a class="link" href="#scalar//">Scalar</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2803917" class="indexterm"></a><a class="link" href="#represent//">Represents</a> arbitrary
                  sized finite mathematical integers. Scalars of this type
                  should be <a id="id2803932" class="indexterm"></a><a class="link" href="#construct//">bound</a> to a
                  <a id="id2803945" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a>
                  integer data type, if possible.
                </p>
                    <p>
                  Some languages (such as Perl) provide only a
                  “<span class="quote">number</span>” type that allows for both integer and
                  floating-point values. A YAML <a id="id2803969" class="indexterm"></a><a class="link" href="#processor//">processor</a> may use such a type
                  for integers, as long as they round-trip properly.
                </p>
                    <p>
                  In some languages (such as C), an integer may overflow the
                  <a id="id2803988" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a>
                  type’s storage capability. A YAML <a id="id2804004" class="indexterm"></a><a class="link" href="#processor//">processor</a> may reject such a
                  value as an error, truncate it with a warning, or find some
                  other manner to round-trip it. In general, integers
                  representable using 32 binary digits should safely round-trip
                  through most systems.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Canonical Form:
                </p>
              </span>
                  </dt>
                  <dd>
                Decimal integer notation, with a leading “<span class="quote"><strong class="userinput"><code>-</code></strong></span>”
                character for negative values, matching the regular expression
                <strong class="userinput"><code>0&nbsp;|&nbsp;-?&nbsp;[1-9]&nbsp;[0-9]*</code></strong></dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2804055"></a>
                <p class="title">
                  <b>Example&nbsp;10.6.&nbsp;<code class="userinput">!!int</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">negative: !!int -12<br>zero: !!int 0
positive: !!int 34
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
            <div class="sect3" xml:lang="en" lang="en">
              <div class="titlepage">
                <div>
                  <div>
                    <h4 class="title"><a id="id2804092"></a>10.2.1.4.&nbsp;<a id="id2804096" class="indexterm"></a><a id="tag/repository/float"></a><em class="firstterm"></em>Floating Point</h4>
                  </div>
                </div>
              </div>
              <div class="variablelist">
                <dl>
                  <dt>
                    <span class="term">
                <p>
                  URI:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <strong class="userinput"><code>tag:yaml.org,2002:float</code></strong>
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Kind:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2804152" class="indexterm"></a><a class="link" href="#scalar//">Scalar</a>.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Definition:
                </p>
              </span>
                  </dt>
                  <dd>
                    <p>
                  <a id="id2804182" class="indexterm"></a><a class="link" href="#represent//">Represents</a> an
                  approximation to real numbers, including three special values
                  (positive and negative infinity, and “<span class="quote">not a
                  number</span>”).
                </p>
                    <p>
                  Some languages (such as Perl) provide only a
                  “<span class="quote">number</span>” type that allows for both integer and
                  floating-point values. A YAML <a id="id2804211" class="indexterm"></a><a class="link" href="#processor//">processor</a> may use such a type
                  for floating-point numbers, as long as they round-trip
                  properly.
                </p>
                    <p>
                  Not all floating-point values can be stored exactly in any
                  given <a id="id2804230" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native</a> type. Hence a float value may
                  change by “<span class="quote">a small amount</span>” when round-tripped.
                  The supported range and accuracy depends on the
                  implementation, though 32 bit IEEE floats should be safe.
                  Since YAML does not specify a particular accuracy, using
                  floating-point <a id="id2804254" class="indexterm"></a><a class="link" href="#key//">mapping keys</a>
                  requires great care and is not recommended.
                </p>
                  </dd>
                  <dt>
                    <span class="term">
                <p>
                  Canonical Form:
                </p>
              </span>
                  </dt>
                  <dd>
                Either <strong class="userinput"><code>0</code></strong>, <strong class="userinput"><code>.inf</code></strong>,
                <strong class="userinput"><code>-.inf</code></strong>, <strong class="userinput"><code>.nan</code></strong>, or
                scientific notation matching the regular expression
                <strong class="userinput"><code>-?&nbsp;[1-9]&nbsp;(&nbsp;\.&nbsp;[0-9]*&nbsp;[1-9]&nbsp;)?&nbsp;(&nbsp;e&nbsp;[-+]&nbsp;[1-9]&nbsp;[0-9]*&nbsp;)?</code></strong>.
              </dd>
                </dl>
              </div>
              <div class="example">
                <a id="id2804318"></a>
                <p class="title">
                  <b>Example&nbsp;10.7.&nbsp;<code class="userinput">!!float</code> Examples</b>
                </p>
                <div class="example-contents">
                  <table class="simplelist" summary="Simple list" border="0">
                    <tbody><tr>
                      <td width="50%">
<pre class="programlisting"><span class="database">negative: !!float -1<br>zero: !!float 0
positive: !!float 2.3e4
infinity: !!float .inf
not a number: !!float .nan
</span></pre>
              </td>
                    </tr>
                  </tbody></table>
                </div>
              </div>
              <br class="example-break">
            </div>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2804356"></a>10.2.2.&nbsp;Tag Resolution</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2804364" class="indexterm"></a><a class="link" href="#schema/JSON/">JSON schema</a>
          <a id="id2804380" class="indexterm"></a><a class="link" href="#tag/resolution/">tag
          resolution</a> is an extension of the <a id="id2804395" class="indexterm"></a><a class="link" href="#schema/failsafe/">failsafe schema</a> <a id="id2804410" class="indexterm"></a><a class="link" href="#tag/resolution/">tag resolution</a>.
        </p>
            <p>
          All <a id="id2804429" class="indexterm"></a><a class="link" href="#node//">nodes</a> with the <a id="id2804441" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20non-specific%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>” non-specific tag</a> are <a id="id2804464" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a>, by the
          standard <a id="id2804479" class="indexterm"></a><a class="link" href="#tag/resolution/convention">convention</a>, to
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>”,
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>”, or
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:str</code></strong></span>”, according to their <a id="id2804519" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
        </p>
            <p>
          <a id="id2804535" class="indexterm"></a><a class="link" href="#collection//">Collections</a> with the <a id="id2804548" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific
          tag</a> (that is, <a id="id2804567" class="indexterm"></a><a class="link" href="#tag/non-specific/">untagged</a> <a id="id2804582" class="indexterm"></a><a class="link" href="#collection//">collections</a>) are <a id="id2804595" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a> to
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>” or
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>” according to their <a id="id2804625" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
        </p>
            <p> <a id="id2804641" class="indexterm"></a><a class="link" href="#scalar//">Scalars</a> with the <a id="id2804654" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific
          tag</a> (that is, <a id="id2804673" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a>) are matched with a list of
          regular expressions (first match wins, e.g. <strong class="userinput"><code>0</code></strong>
          is resolved as <strong class="userinput"><code>!!int</code></strong>). In principle, JSON
          files should not contain any <a id="id2804705" class="indexterm"></a><a class="link" href="#scalar//">scalars</a> that do not match at least one of
          these. Hence the YAML <a id="id2804718" class="indexterm"></a><a class="link" href="#processor//">processor</a> should consider them to be an
          error.
        </p>
            <div class="informaltable">
              <table style="width: 0%;" border="0">
                <colgroup>
                  <col>
                  <col>
                </colgroup>
                <tbody>
                  <tr>
                    <td width="50%">&nbsp;<span class="emphasis"><em>Regular&nbsp;expression&nbsp;</em></span></td>
                    <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Resolved&nbsp;to&nbsp;tag</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>null</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:null</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>true&nbsp;|&nbsp;false</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:bool</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>-?&nbsp;(&nbsp;0&nbsp;|&nbsp;[1-9]&nbsp;[0-9]*&nbsp;)</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:int</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>-?&nbsp;(&nbsp;0&nbsp;|&nbsp;[1-9]&nbsp;[0-9]*&nbsp;)&nbsp;(&nbsp;\.&nbsp;[0-9]*&nbsp;)?&nbsp;(&nbsp;[eE]&nbsp;[-+]?&nbsp;[0-9]+&nbsp;)?</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:float</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>*</code></strong></td>
                    <td width="50%">&nbsp;Error</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="example">
              <a id="id2804866"></a>
              <p class="title">
                <b>Example&nbsp;10.8.&nbsp;JSON Tag Resolution</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">A null: null<br>Booleans: [ true, false ]
Integers: [ 0, -0, 3, -19 ]
Floats: [ 0., -0.0, 12e03, -2E+05 ]
Invalid: [ True, Null, 0o7, 0x3A, +12.3 ]
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  !!str "A null" : !!null "null",
  !!str "Booleans: !!seq [
    !!bool "true", !!bool "false"
  ],
  !!str "Integers": !!seq [
    !!int "0", !!int "-0",
    !!int "3", !!int "-19"
  ],
  !!str "Floats": !!seq [
    !!float "0.", !!float "-0.0",
    !!float "12e03", !!float "-2E+05"
  ],
  !!str "Invalid": !!seq [
    # Rejected by the schema
    True, Null, 0o7, 0x3A, +12.3,
  ],
}
...
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2804923"></a>10.3.&nbsp;Core Schema</h2>
              </div>
            </div>
          </div>
          <p>
        The <a id="id2804931" class="indexterm"></a><a id="schema/core/"></a><em class="firstterm">Core schema</em> is
        an extension of the <a id="id2804949" class="indexterm"></a><a class="link" href="#schema/JSON/">JSON
        schema</a>, allowing for more human-readable <a id="id2804964" class="indexterm"></a><a class="link" href="#present//">presentation</a> of the same types. This is the
        recommended default <a id="id2804978" class="indexterm"></a><a class="link" href="#schema//">schema</a> that
        YAML <a id="id2804991" class="indexterm"></a><a class="link" href="#processor//">processor</a> should use unless
        instructed otherwise. It is also strongly recommended that other
        <a id="id2805005" class="indexterm"></a><a class="link" href="#schema//">schemas</a> should be based on it.
      </p>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2805019"></a>10.3.1.&nbsp;Tags</h3>
                </div>
              </div>
            </div>
            <p>
          The core <a id="id2805027" class="indexterm"></a><a class="link" href="#schema//">schema</a> uses the same
          <a id="id2805040" class="indexterm"></a><a class="link" href="#tag//">tags</a> as the <a id="id2805053" class="indexterm"></a><a class="link" href="#schema/JSON/">JSON schema</a>.
        </p>
          </div>
          <div class="sect2" xml:lang="en" lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h3 class="title"><a id="id2805071"></a>10.3.2.&nbsp;Tag Resolution</h3>
                </div>
              </div>
            </div>
            <p>
          The <a id="id2805078" class="indexterm"></a><a class="link" href="#schema/core/">core schema</a>
          <a id="id2805095" class="indexterm"></a><a class="link" href="#tag/resolution/">tag
          resolution</a> is an extension of the <a id="id2805111" class="indexterm"></a><a class="link" href="#schema/JSON/">JSON schema</a> <a id="id2805126" class="indexterm"></a><a class="link" href="#tag/resolution/">tag resolution</a>.
        </p>
            <p>
          All <a id="id2805144" class="indexterm"></a><a class="link" href="#node//">nodes</a> with the <a id="id2805157" class="indexterm"></a><a class="link" href="#%21%20tag%20indicator/%21%20non-specific%20tag/">“<span class="quote"><strong class="userinput"><code>!</code></strong></span>” non-specific tag</a> are <a id="id2805179" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a>, by the
          standard <a id="id2805195" class="indexterm"></a><a class="link" href="#tag/resolution/convention">convention</a>, to
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>”,
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>”, or
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:str</code></strong></span>”, according to their <a id="id2805235" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
        </p>
            <p>
          <a id="id2805250" class="indexterm"></a><a class="link" href="#collection//">Collections</a> with the <a id="id2805264" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific
          tag</a> (that is, <a id="id2805282" class="indexterm"></a><a class="link" href="#tag/non-specific/">untagged</a> <a id="id2805298" class="indexterm"></a><a class="link" href="#collection//">collections</a>) are <a id="id2805311" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a> to
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:seq</code></strong></span>” or
          “<span class="quote"><strong class="userinput"><code>tag:yaml.org,2002:map</code></strong></span>” according to their <a id="id2805341" class="indexterm"></a><a class="link" href="#kind//">kind</a>.
        </p>
            <p>
          <a id="id2805356" class="indexterm"></a><a class="link" href="#scalar//">Scalars</a> with the <a id="id2805369" class="indexterm"></a><a class="link" href="#?%20non-specific%20tag//">“<span class="quote"><strong class="userinput"><code>?</code></strong></span>” non-specific
          tag</a> (that is, <a id="id2805388" class="indexterm"></a><a class="link" href="#style/flow/plain">plain scalars</a>) are matched with an
          extended list of regular expressions. However, in this case, if none
          of the regular expressions matches, the <a id="id2805408" class="indexterm"></a><a class="link" href="#scalar//">scalar</a> is <a id="id2805421" class="indexterm"></a><a class="link" href="#tag/resolution/">resolved</a> to
          <strong class="userinput"><code>tag:yaml.org,2002:str</code></strong> (that is, considered to
          be a string).
        </p>
            <div class="informaltable">
              <table style="width: 0%;" border="0">
                <colgroup>
                  <col>
                  <col>
                </colgroup>
                <tbody>
                  <tr>
                    <td width="50%">&nbsp;<span class="emphasis"><em>Regular&nbsp;expression&nbsp;</em></span></td>
                    <td width="50%">&nbsp;<span class="emphasis"><em>&nbsp;Resolved&nbsp;to&nbsp;tag</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>null&nbsp;|&nbsp;Null&nbsp;|&nbsp;NULL&nbsp;|&nbsp;~</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:null</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>/*&nbsp;Empty&nbsp;*/</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:null</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>true&nbsp;|&nbsp;True&nbsp;|&nbsp;TRUE&nbsp;|&nbsp;false&nbsp;|&nbsp;False&nbsp;|&nbsp;FALSE</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:bool</code></strong></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>[-+]?&nbsp;[0-9]+</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:int</code></strong>&nbsp;<span class="emphasis"><em>(Base&nbsp;10)</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>0o&nbsp;[0-7]+</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:int</code></strong>&nbsp;<span class="emphasis"><em>(Base&nbsp;8)</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>0x&nbsp;[0-9a-fA-F]+</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:int</code></strong>&nbsp;<span class="emphasis"><em>(Base&nbsp;16)</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>[-+]?&nbsp;(&nbsp;\.&nbsp;[0-9]+&nbsp;|&nbsp;[0-9]+&nbsp;(&nbsp;\.&nbsp;[0-9]*&nbsp;)?&nbsp;)&nbsp;(&nbsp;[eE]&nbsp;[-+]?&nbsp;[0-9]+&nbsp;)?</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:float</code></strong>&nbsp;<span class="emphasis"><em>(Number)</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>[-+]?&nbsp;(&nbsp;\.inf&nbsp;|&nbsp;\.Inf&nbsp;|&nbsp;\.INF&nbsp;)</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:float</code></strong>&nbsp;<span class="emphasis"><em>(Infinity)</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>\.nan&nbsp;|&nbsp;\.NaN&nbsp;|&nbsp;\.NAN</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:float</code></strong>&nbsp;<span class="emphasis"><em>(Not&nbsp;a&nbsp;number)</em></span></td>
                  </tr>
                  <tr>
                    <td width="50%">&nbsp;<strong class="userinput"><code>*</code></strong></td>
                    <td width="50%">&nbsp;<strong class="userinput"><code>tag:yaml.org,2002:str</code></strong>&nbsp;<span class="emphasis"><em>(Default)</em></span></td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="example">
              <a id="id2805712"></a>
              <p class="title">
                <b>Example&nbsp;10.9.&nbsp;Core Tag Resolution</b>
              </p>
              <div class="example-contents">
                <table class="simplelist" summary="Simple list" border="0">
                  <tbody><tr>
                    <td width="50%">
<pre class="programlisting"><span class="database">A null: null<br>Also a null: # Empty
Not a null: ""
Booleans: [ true, True, false, FALSE ]
Integers: [ 0, 0o7, 0x3A, -19 ]
Floats: [ 0., -0.0, .5, +12e03, -2E+05 ]
Also floats: [ .inf, -.Inf, +.INF, .NAN ]
</span></pre>
            </td>
                    <td width="50%">
<pre class="programlisting"><span class="database">%YAML 1.2<br>---
!!map {
  !!str "A null" : !!null "null",
  !!str "Also a null" : !!null "",
  !!str "Not a null" : !!str "",
  !!str "Booleans: !!seq [
    !!bool "true", !!bool "True",
    !!bool "false", !!bool "FALSE",
  ],
  !!str "Integers": !!seq [
    !!int "0", !!int "0o7",
    !!int "0x3A", !!int "-19",
  ],
  !!str "Floats": !!seq [
    !!float "0.", !!float "-0.0", !!float ".5",
    !!float "+12e03", !!float "-2E+05"
  ],
  !!str "Also floats": !!seq [
    !!float ".inf", !!float "-.Inf",
    !!float "+.INF", !!float ".NAN",
  ],
}
...
</span></pre>
            </td>
                  </tr>
                </tbody></table>
              </div>
            </div>
            <br class="example-break">
          </div>
        </div>
        <div class="sect1" xml:lang="en" lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h2 class="title" style="clear: both;"><a id="id2805770"></a>10.4.&nbsp;Other Schemas</h2>
              </div>
            </div>
          </div>
          <p>
        None of the above recommended <a id="id2805779" class="indexterm"></a><a class="link" href="#schema//">schemas</a> preclude the use of arbitrary
        explicit <a id="id2805792" class="indexterm"></a><a class="link" href="#tag//">tags</a>. Hence YAML <a id="id2805805" class="indexterm"></a><a class="link" href="#processor//">processors</a> for a particular programming
        language typically provide some form of <a id="id2805819" class="indexterm"></a><a class="link" href="#tag/local/">local tags</a> that map directly to the
        language’s <a id="id2805835" class="indexterm"></a><a class="link" href="#native%20data%20structure//">native data
        structures</a> (e.g., <strong class="userinput"><code>!ruby/object:Set</code></strong>).
      </p>
          <p>
        While such <a id="id2805859" class="indexterm"></a><a class="link" href="#tag/local/">local
        tags</a> are useful for ad-hoc <a id="id2805874" class="indexterm"></a><a class="link" href="#application//">applications</a>, they do not suffice for
        stable, interoperable cross-<a id="id2805888" class="indexterm"></a><a class="link" href="#application//">application</a> or cross-platform data
        exchange.
      </p>
          <p>
        Interoperable <a id="id2805906" class="indexterm"></a><a class="link" href="#schema//">schemas</a> make use of
        <a id="id2805918" class="indexterm"></a><a class="link" href="#tag/global/">global tags</a> (URIs)
        that <a id="id2805933" class="indexterm"></a><a class="link" href="#represent//">represent</a> the same data
        across different programming languages. In addition, an interoperable
        <a id="id2805948" class="indexterm"></a><a class="link" href="#schema//">schema</a> may provide additional
        <a id="id2805961" class="indexterm"></a><a class="link" href="#tag/resolution/">tag resolution</a>
        rules. Such rules may provide additional regular expressions, as well
        as consider the path to the <a id="id2805978" class="indexterm"></a><a class="link" href="#node//">node</a>.
        This allows interoperable <a id="id2805991" class="indexterm"></a><a class="link" href="#schema//">schemas</a>
        to use <a id="id2806004" class="indexterm"></a><a class="link" href="#tag/non-specific/">untagged</a> <a id="id2806019" class="indexterm"></a><a class="link" href="#node//">nodes</a>.
      </p>
          <p>
        It is strongly recommended that such <a id="id2806035" class="indexterm"></a><a class="link" href="#schema//">schemas</a> be based on the <a id="id2806048" class="indexterm"></a><a class="link" href="#schema/core/">core schema</a> defined above.
        In addition, it is strongly recommended that such <a id="id2806065" class="indexterm"></a><a class="link" href="#schema//">schemas</a> make as much use as possible of the
        the <a id="id2806078" class="indexterm"></a><a id="tag/repository/"></a><em class="firstterm">YAML tag
        repository</em> at <a class="ulink" href="http://yaml.org/type/" target="_top">http://yaml.org/type/</a>. This
        repository provides recommended <a id="id2806101" class="indexterm"></a><a class="link" href="#tag/global/">global tags</a> for increasing the portability
        of YAML <a id="id2806116" class="indexterm"></a><a class="link" href="#document//">documents</a> between
        different <a id="id2806129" class="indexterm"></a><a class="link" href="#application//">applications</a>.
      </p>
          <p>
        The tag repository is intentionally left out of the scope of this
        specification. This allows it to evolve to better support YAML <a id="id2806147" class="indexterm"></a><a class="link" href="#application//">applications</a>. Hence, developers are
        encouraged to submit new “<span class="quote">universal</span>” types to the
        repository. The yaml-core mailing list at <a class="ulink" href="http://lists.sourceforge.net/lists/listinfo/yaml-core" target="_top">http://lists.sourceforge.net/lists/listinfo/yaml-core</a> is the
        preferred method for such submissions, as well as raising any questions
        regarding this draft.
      </p>
        </div>
      </div>
      <div class="index">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title"><a id="id2806177"></a>Index</h2>
            </div>
          </div>
        </div>
        <div class="index">
          <div class="indexdiv">
            <h3>Indicators</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-! tag  indicator"></a>! tag         indicator, <a href="#id2761292">Tags</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2784064">Node Tags</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">! local tag, <a xmlns="" class="preferred" href="#id2764295">Tags</a>, <a xmlns="" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2783273">Tag Prefixes</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">! non-specific           tag, <a xmlns="" class="preferred" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2803036">Tag Resolution</a>, <a xmlns="" href="#id2804356">Tag Resolution</a>, <a xmlns="" href="#id2805071">Tag Resolution</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">! primary tag                   handle, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">!!                   secondary tag handle, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">!…! named                   handle, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-&quot; double-quoted  style"></a>" double-quoted           style, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2787109">Double-Quoted Style</a></dt>
              <dt xmlns=""><a id="index-entry-# comment"></a># comment, <a href="#id2759963">Collections</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2780069">Comments</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2793979">Block Indentation Indicator</a></dt>
              <dt xmlns=""><a id="index-entry-% directive"></a>% directive, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2781147">Directives</a>, <a href="#id2800401">Document Markers</a>, <a href="#id2800967">Bare Documents</a></dt>
              <dt xmlns=""><a id="index-entry-% escaping in URI"></a>% escaping in URI, <a href="#id2764295">Tags</a>, <a class="preferred" href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a></dt>
              <dt xmlns=""><a id="index-entry-&amp;  anchor"></a>&amp;         anchor, <a href="#id2760395">Structures</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2785586">Node Anchors</a></dt>
              <dt xmlns=""><a id="index-entry-' reserved  indicator"></a>' reserved           indicator, <a class="preferred" href="#id2772075">Indicator Characters</a></dt>
              <dt xmlns=""><a id="index-entry-' single-quoted  style"></a>' single-quoted           style, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2788097">Single-Quoted Style</a></dt>
              <dt xmlns=""><a id="index-entry-*  alias"></a>*         alias, <a href="#id2760395">Structures</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2786196">Alias Nodes</a></dt>
              <dt xmlns=""><a id="index-entry-+ keep  chomping"></a>+ keep                 chomping, <a class="preferred" href="#id2794534">Block Chomping Indicator</a></dt>
              <dt xmlns=""><a id="index-entry-, end flow entry"></a>, end flow entry, <a href="#id2759963">Collections</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790088">Flow Collection Styles</a>, <a href="#id2790320">Flow Sequences</a>, <a href="#id2790832">Flow Mappings</a></dt>
              <dt xmlns=""><a id="index-entry-- block sequence entry"></a>- block sequence entry, <a href="#Introduction">Introduction</a>, <a href="#id2759963">Collections</a>, <a href="#id2760395">Structures</a>, <a href="#id2769866">Production Parameters</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2797293">Block Collection Styles</a>, <a class="preferred" href="#id2797382">Block Sequences</a>, <a href="#id2799181">Block Nodes</a></dt>
              <dt xmlns=""><a id="index-entry-- strip chomping"></a>- strip chomping, <a class="preferred" href="#id2794534">Block Chomping Indicator</a></dt>
              <dt xmlns=""><a id="index-entry-: mapping value"></a>: mapping value, <a href="#Introduction">Introduction</a>, <a href="#id2759963">Collections</a>, <a href="#id2760395">Structures</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790832">Flow Mappings</a>, <a href="#id2798057">Block Mappings</a></dt>
              <dt xmlns=""><a id="index-entry-&lt;…&gt; verbatim  tag"></a>&lt;…&gt; verbatim               tag, <a class="preferred" href="#id2784064">Node Tags</a></dt>
              <dt xmlns=""><a id="index-entry-&gt; folded style"></a>&gt; folded style, <a href="#id2760844">Scalars</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2796251">Folded Style</a></dt>
              <dt xmlns=""><a id="index-entry-? mapping  key"></a>? mapping         key, <a href="#id2760395">Structures</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790832">Flow Mappings</a>, <a href="#id2798057">Block Mappings</a></dt>
              <dt xmlns=""><a id="index-entry-? non-specific tag"></a>? non-specific tag, <a class="preferred" href="#id2768011">Resolved Tags</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2803036">Tag Resolution</a>, <a href="#id2804356">Tag Resolution</a>, <a href="#id2805071">Tag Resolution</a></dt>
              <dt xmlns=""><a id="index-entry-@ reserved  indicator"></a>@ reserved           indicator, <a class="preferred" href="#id2772075">Indicator Characters</a></dt>
              <dt xmlns=""><a id="index-entry-[ start flow sequence"></a>[ start flow sequence, <a href="#id2759963">Collections</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790320">Flow Sequences</a></dt>
              <dt xmlns=""><a id="index-entry-\ escaping in double-quoted  scalars"></a>\ escaping in double-quoted         scalars, <a class="preferred" href="#id2776092">Escaped Characters</a>, <a href="#id2787109">Double-Quoted Style</a></dt>
              <dt xmlns=""><a id="index-entry-] end flow sequence"></a>] end flow sequence, <a href="#id2759963">Collections</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790320">Flow Sequences</a></dt>
              <dt xmlns=""><a id="index-entry-{ start flow  mapping"></a>{ start flow         mapping, <a href="#id2759963">Collections</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790832">Flow Mappings</a></dt>
              <dt xmlns=""><a id="index-entry-| literal style"></a>| literal style, <a href="#id2760844">Scalars</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2795688">Literal Style</a></dt>
              <dt xmlns=""><a id="index-entry-} end flow  mapping"></a>} end flow         mapping, <a href="#id2759963">Collections</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2788859">Plain Style</a>, <a class="preferred" href="#id2790832">Flow Mappings</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3></h3>
            <dl>
              <dt xmlns="">
                <a id="index-entry-"></a>
              </dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">prefix, <a xmlns="" class="preferred" href="#id2800168">Document Prefix</a></dt>
                </dl>
              </dd>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>A</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-alias"></a>alias, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2767852">Well-Formed Streams and Identified Aliases</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2785586">Node Anchors</a>, <a href="#Flow">Flow Styles</a>, <a class="preferred" href="#id2786196">Alias Nodes</a>, <a href="#id2792977">Flow Nodes</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">identified, <a xmlns="" href="#id2760395">Structures</a>, <a xmlns="" class="preferred" href="#id2765878">Anchors and Aliases</a>, <a xmlns="" href="#id2767852">Well-Formed Streams and Identified Aliases</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">unidentified, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2767852">Well-Formed Streams and Identified Aliases</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-anchor"></a>anchor, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a href="#id2765410">Serialization Tree</a>, <a class="preferred" href="#id2765878">Anchors and Aliases</a>, <a href="#id2767852">Well-Formed Streams and Identified Aliases</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2783797">Node Properties</a>, <a href="#Flow">Flow Styles</a>, <a href="#id2786196">Alias Nodes</a>, <a href="#id2792977">Flow Nodes</a></dt>
              <dt xmlns=""><a id="index-entry-application"></a>application, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2761292">Tags</a>, <a class="preferred" href="#Processing">Processing YAML Information</a>, <a href="#id2762313">Dump</a>, <a href="#id2763452">Information Models</a>, <a href="#id2764295">Tags</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769542">Available Tags</a>, <a href="#id2783273">Tag Prefixes</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2801681">Streams</a>, <a href="#id2803036">Tag Resolution</a>, <a href="#id2805770">Other Schemas</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>B</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-block scalar header"></a>block scalar header, <a href="#id2780069">Comments</a>, <a class="preferred" href="#id2793718">Block Scalar Headers</a>, <a href="#id2794534">Block Chomping Indicator</a></dt>
              <dt xmlns=""><a id="index-entry-byte order mark"></a>byte order mark, <a class="preferred" href="#id2771184">Character Encodings</a>, <a href="#id2800168">Document Prefix</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>C</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-character encoding"></a>character encoding, <a class="preferred" href="#id2771184">Character Encodings</a>, <a href="#id2800168">Document Prefix</a>, <a href="#id2801681">Streams</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">in URI, <a xmlns="" class="preferred" href="#id2775468">Miscellaneous Characters</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-chomping"></a>chomping, <a href="#id2769866">Production Parameters</a>, <a href="#id2779048">Line Folding</a>, <a class="preferred" href="#id2794534">Block Chomping Indicator</a>, <a href="#id2795688">Literal Style</a>, <a href="#id2796251">Folded Style</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">clip, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" class="preferred" href="#id2794534">Block Chomping Indicator</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">keep, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" class="preferred" href="#id2794534">Block Chomping Indicator</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">strip, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" class="preferred" href="#id2794534">Block Chomping Indicator</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-collection"></a>collection, <a href="#id2708710">Prior Art</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2767100">Comments</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2804356">Tag Resolution</a>, <a href="#id2805071">Tag Resolution</a></dt>
              <dt xmlns=""><a id="index-entry-comment"></a>comment, <a href="#id2759963">Collections</a>, <a href="#id2762107">Processes</a>, <a href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2767100">Comments</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2780069">Comments</a>, <a href="#id2780810">Separation Lines</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2793718">Block Scalar Headers</a>, <a href="#id2794534">Block Chomping Indicator</a>, <a href="#id2800168">Document Prefix</a>, <a href="#id2801681">Streams</a></dt>
              <dt xmlns=""><a id="index-entry-compose"></a>compose, <a href="#id2762107">Processes</a>, <a class="preferred" href="#id2763035">Load</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2769542">Available Tags</a>, <a href="#id2785586">Node Anchors</a></dt>
              <dt xmlns=""><a id="index-entry-construct"></a>construct, <a href="#id2762107">Processes</a>, <a class="preferred" href="#id2763035">Load</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2769542">Available Tags</a>, <a href="#Flow">Flow Styles</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2802662">Generic Sequence</a>, <a href="#id2802842">Generic String</a>, <a href="#id2803362">Null</a>, <a href="#id2803629">Boolean</a>, <a href="#id2803828">Integer</a></dt>
              <dt xmlns=""><a id="index-entry-content"></a>content, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2771184">Character Encodings</a>, <a href="#id2774608">Line Break Characters</a>, <a href="#id2776092">Escaped Characters</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2778241">Separation Spaces</a>, <a href="#id2778481">Line Prefixes</a>, <a href="#id2778853">Empty Lines</a>, <a href="#id2779048">Line Folding</a>, <a href="#id2780069">Comments</a>, <a href="#id2781147">Directives</a>, <a href="#id2782457">Tag Handles</a>, <a href="#id2783797">Node Properties</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2786196">Alias Nodes</a>, <a href="#id2786563">Empty Nodes</a>, <a href="#id2786942">Flow Scalar Styles</a>, <a href="#id2787109">Double-Quoted Style</a>, <a href="#id2788097">Single-Quoted Style</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2793718">Block Scalar Headers</a>, <a href="#id2793979">Block Indentation Indicator</a>, <a href="#id2794534">Block Chomping Indicator</a>, <a href="#id2795688">Literal Style</a>, <a href="#id2800401">Document Markers</a>, <a href="#id2800967">Bare Documents</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">valid, <a xmlns="" class="preferred" href="#id2769212">Recognized and Valid Tags</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-context"></a>context, <a class="preferred" href="#id2769866">Production Parameters</a>, <a href="#id2788859">Plain Style</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">block-in, <a xmlns="" class="preferred" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">block-key, <a xmlns="" class="preferred" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">block-out, <a xmlns="" class="preferred" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">flow-in, <a xmlns="" class="preferred" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">flow-key, <a xmlns="" class="preferred" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">flow-out, <a xmlns="" class="preferred" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a></dt>
                </dl>
              </dd>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>D</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-directive"></a>directive, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2767222">Directives</a>, <a href="#id2772075">Indicator Characters</a>, <a class="preferred" href="#id2781147">Directives</a>, <a href="#id2800401">Document Markers</a>, <a href="#id2800967">Bare Documents</a>, <a href="#id2801301">Explicit Documents</a>, <a href="#id2801522">Directives Documents</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">reserved, <a xmlns="" href="#id2767222">Directives</a>, <a xmlns="" class="preferred" href="#id2781147">Directives</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">TAG, <a xmlns="" href="#id2764295">Tags</a>, <a xmlns="" href="#id2767222">Directives</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2781147">Directives</a>, <a xmlns="" class="preferred" href="#id2782090">“TAG” Directives</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">YAML, <a xmlns="" href="#id2767222">Directives</a>, <a xmlns="" href="#id2781147">Directives</a>, <a xmlns="" class="preferred" href="#id2781553">“YAML” Directives</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-document"></a>document, <a href="#id2708710">Prior Art</a>, <a href="#id2760395">Structures</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2767222">Directives</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2771184">Character Encodings</a>, <a href="#id2774608">Line Break Characters</a>, <a href="#id2781553">“YAML” Directives</a>, <a href="#id2783273">Tag Prefixes</a>, <a href="#id2786196">Alias Nodes</a>, <a class="preferred" href="#id2800132">Documents</a>, <a href="#id2800168">Document Prefix</a>, <a href="#id2800401">Document Markers</a>, <a href="#id2801301">Explicit Documents</a>, <a href="#id2801681">Streams</a>, <a href="#id2802346">Failsafe Schema</a>, <a href="#id2805770">Other Schemas</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">bare, <a xmlns="" class="preferred" href="#id2800967">Bare Documents</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">directives, <a xmlns="" class="preferred" href="#id2801522">Directives Documents</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">explicit, <a xmlns="" class="preferred" href="#id2801301">Explicit Documents</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">suffix, <a xmlns="" class="preferred" href="#id2800401">Document Markers</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-dump"></a>dump, <a href="#id2762107">Processes</a>, <a class="preferred" href="#id2762313">Dump</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>E</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-empty  line"></a>empty         line, <a href="#id2708710">Prior Art</a>, <a href="#id2760844">Scalars</a>, <a class="preferred" href="#id2778853">Empty Lines</a>, <a href="#id2779048">Line Folding</a>, <a href="#id2793979">Block Indentation Indicator</a>, <a href="#id2794534">Block Chomping Indicator</a>, <a href="#id2795688">Literal Style</a>, <a href="#id2796251">Folded Style</a></dt>
              <dt xmlns=""><a id="index-entry-equality"></a>equality, <a href="#id2759572">Relation to JSON</a>, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a class="preferred" href="#id2764652">Node Comparison</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2769212">Recognized and Valid Tags</a></dt>
              <dt xmlns=""><a id="index-entry-escaping"></a>escaping</dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">in         double-quoted scalars, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2770814">Character Set</a>, <a xmlns="" href="#id2771184">Character Encodings</a>, <a xmlns="" href="#id2775468">Miscellaneous Characters</a>, <a xmlns="" class="preferred" href="#id2776092">Escaped Characters</a>, <a xmlns="" href="#id2787109">Double-Quoted Style</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">in           single-quoted scalars, <a xmlns="" class="preferred" href="#id2788097">Single-Quoted Style</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">in             URIs, <a xmlns="" class="preferred" href="#id2775468">Miscellaneous Characters</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">non-content line           break, <a xmlns="" class="preferred" href="#id2787109">Double-Quoted Style</a></dt>
                </dl>
              </dd>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>I</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-identity"></a>identity, <a class="preferred" href="#id2764652">Node Comparison</a></dt>
              <dt xmlns=""><a id="index-entry-indicator"></a>indicator, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2759963">Collections</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2769866">Production Parameters</a>, <a class="preferred" href="#id2772075">Indicator Characters</a>, <a href="#id2779048">Line Folding</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2792977">Flow Nodes</a>, <a href="#Block">Block Styles</a>, <a href="#id2793718">Block Scalar Headers</a>, <a href="#id2797293">Block Collection Styles</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">indentation, <a xmlns="" class="preferred" href="#id2793979">Block Indentation Indicator</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">reserved, <a xmlns="" class="preferred" href="#id2772075">Indicator Characters</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-information model"></a>information model, <a class="preferred" href="#id2763452">Information Models</a></dt>
              <dt xmlns=""><a id="index-entry-invalid  content"></a>invalid         content, <a href="#id2767381">Loading Failure Points</a>, <a class="preferred" href="#id2769212">Recognized and Valid Tags</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>J</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-JSON compatibility"></a>JSON compatibility, <a href="#id2770814">Character Set</a>, <a href="#id2771184">Character Encodings</a>, <a href="#id2774608">Line Break Characters</a>, <a href="#id2776092">Escaped Characters</a>, <a href="#id2780069">Comments</a>, <a class="preferred" href="#id2781553">“YAML” Directives</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2798057">Block Mappings</a></dt>
              <dt xmlns=""><a id="index-entry-JSON-like"></a>JSON-like, <a href="#id2790832">Flow Mappings</a>, <a class="preferred" href="#id2792977">Flow Nodes</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>K</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-key"></a>key, <a href="#id2759572">Relation to JSON</a>, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a href="#id2763452">Information Models</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2798057">Block Mappings</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2803362">Null</a>, <a href="#id2804092">Floating Point</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">implicit, <a xmlns="" href="#id2780810">Separation Lines</a>, <a xmlns="" href="#id2787109">Double-Quoted Style</a>, <a xmlns="" href="#id2788097">Single-Quoted Style</a>, <a xmlns="" href="#id2788859">Plain Style</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a>, <a xmlns="" class="preferred" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2798057">Block Mappings</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">order, <a xmlns="" href="#id2762107">Processes</a>, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2763452">Information Models</a>, <a xmlns="" href="#id2765410">Serialization Tree</a>, <a xmlns="" class="preferred" href="#id2765608">Keys Order</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-key: value pair"></a>key: value pair, <a href="#Introduction">Introduction</a>, <a href="#id2759963">Collections</a>, <a href="#id2760395">Structures</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2797293">Block Collection Styles</a>, <a href="#id2798057">Block Mappings</a></dt>
              <dt xmlns=""><a id="index-entry-kind"></a>kind, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2803036">Tag Resolution</a>, <a href="#id2804356">Tag Resolution</a>, <a href="#id2805071">Tag Resolution</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>L</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-line break"></a>line break, <a href="#id2708710">Prior Art</a>, <a href="#id2760844">Scalars</a>, <a href="#id2769866">Production Parameters</a>, <a href="#id2770517">Production Naming Conventions</a>, <a class="preferred" href="#id2774608">Line Break Characters</a>, <a href="#id2775170">White Space Characters</a>, <a href="#id2778853">Empty Lines</a>, <a href="#id2779048">Line Folding</a>, <a href="#id2780069">Comments</a>, <a href="#id2787109">Double-Quoted Style</a>, <a href="#id2793718">Block Scalar Headers</a>, <a href="#id2794534">Block Chomping Indicator</a>, <a href="#id2795688">Literal Style</a>, <a href="#id2796251">Folded Style</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">non-ASCII, <a xmlns="" class="preferred" href="#id2774608">Line Break Characters</a>, <a xmlns="" href="#id2781553">“YAML” Directives</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">normalization, <a xmlns="" class="preferred" href="#id2774608">Line Break Characters</a>, <a xmlns="" href="#id2795688">Literal Style</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-line folding"></a>line folding, <a href="#id2708710">Prior Art</a>, <a href="#id2760844">Scalars</a>, <a class="preferred" href="#id2779048">Line Folding</a>, <a href="#Flow">Flow Styles</a>, <a href="#id2787109">Double-Quoted Style</a>, <a href="#id2788097">Single-Quoted Style</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2794534">Block Chomping Indicator</a>, <a href="#id2796251">Folded Style</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">block, <a xmlns="" class="preferred" href="#id2779048">Line Folding</a>, <a xmlns="" href="#id2796251">Folded Style</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">flow, <a xmlns="" class="preferred" href="#id2779048">Line Folding</a>, <a xmlns="" href="#id2787109">Double-Quoted Style</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-line prefix"></a>line prefix, <a class="preferred" href="#id2778481">Line Prefixes</a>, <a href="#id2778853">Empty Lines</a></dt>
              <dt xmlns=""><a id="index-entry-load"></a>load, <a href="#id2762107">Processes</a>, <a class="preferred" href="#id2763035">Load</a>, <a href="#id2767381">Loading Failure Points</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">failure               point, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" class="preferred" href="#id2767381">Loading Failure Points</a></dt>
                </dl>
              </dd>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>M</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-mapping"></a>mapping, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2759572">Relation to JSON</a>, <a href="#id2759963">Collections</a>, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2790320">Flow Sequences</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2803362">Null</a></dt>
              <dt xmlns=""><a id="index-entry-marker"></a>marker, <a href="#id2766150">Presentation Stream</a>, <a class="preferred" href="#id2800401">Document Markers</a>, <a href="#id2800967">Bare Documents</a>, <a href="#id2801301">Explicit Documents</a>, <a href="#id2801681">Streams</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">directives end, <a xmlns="" href="#id2760395">Structures</a>, <a xmlns="" class="preferred" href="#id2800401">Document Markers</a>, <a xmlns="" href="#id2801301">Explicit Documents</a>, <a xmlns="" href="#id2801522">Directives Documents</a>, <a xmlns="" href="#id2801681">Streams</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">document         end, <a xmlns="" href="#id2760395">Structures</a>, <a xmlns="" class="preferred" href="#id2800401">Document Markers</a>, <a xmlns="" href="#id2801681">Streams</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-more-indented"></a>more-indented, <a href="#id2760844">Scalars</a>, <a href="#id2779048">Line Folding</a>, <a class="preferred" href="#id2796251">Folded Style</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>N</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-native data structure"></a>native data structure, <a href="#Introduction">Introduction</a>, <a href="#id2708649">Goals</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2759572">Relation to JSON</a>, <a href="#Processing">Processing YAML Information</a>, <a href="#id2762107">Processes</a>, <a class="preferred" href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2763754">Representation Graph</a>, <a href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2769542">Available Tags</a>, <a href="#id2784064">Node Tags</a>, <a href="#Flow">Flow Styles</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2802662">Generic Sequence</a>, <a href="#id2802842">Generic String</a>, <a href="#id2803362">Null</a>, <a href="#id2803629">Boolean</a>, <a href="#id2803828">Integer</a>, <a href="#id2804092">Floating Point</a>, <a href="#id2805770">Other Schemas</a></dt>
              <dt xmlns=""><a id="index-entry-need not"></a>need not, <a class="preferred" href="#id2759768">Terminology</a></dt>
              <dt xmlns=""><a id="index-entry-node"></a>node, <a href="#id2760395">Structures</a>, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2767100">Comments</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2767852">Well-Formed Streams and Identified Aliases</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#Syntax">Syntax Conventions</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2783797">Node Properties</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2786196">Alias Nodes</a>, <a href="#id2786563">Empty Nodes</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2792977">Flow Nodes</a>, <a href="#id2793979">Block Indentation Indicator</a>, <a href="#id2797382">Block Sequences</a>, <a href="#id2800967">Bare Documents</a>, <a href="#id2803036">Tag Resolution</a>, <a href="#id2804356">Tag Resolution</a>, <a href="#id2805071">Tag Resolution</a>, <a href="#id2805770">Other Schemas</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">completely empty, <a xmlns="" class="preferred" href="#id2786563">Empty Nodes</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a>, <a xmlns="" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2801301">Explicit Documents</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">property, <a xmlns="" class="preferred" href="#id2783797">Node Properties</a>, <a xmlns="" href="#id2786196">Alias Nodes</a>, <a xmlns="" href="#id2786563">Empty Nodes</a>, <a xmlns="" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2792977">Flow Nodes</a>, <a xmlns="" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2798057">Block Mappings</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">root, <a xmlns="" class="preferred" href="#id2763754">Representation Graph</a>, <a xmlns="" href="#id2768011">Resolved Tags</a></dt>
                </dl>
              </dd>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>P</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-parse"></a>parse, <a class="preferred" href="#id2763035">Load</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769866">Production Parameters</a>, <a href="#id2774608">Line Break Characters</a>, <a href="#id2776092">Escaped Characters</a>, <a href="#id2782457">Tag Handles</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2798057">Block Mappings</a>, <a href="#id2799181">Block Nodes</a>, <a href="#id2800401">Document Markers</a>, <a href="#id2803231">JSON Schema</a></dt>
              <dt xmlns=""><a id="index-entry-present"></a>present, <a href="#Processing">Processing YAML Information</a>, <a class="preferred" href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2764044">Nodes</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2770814">Character Set</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2786196">Alias Nodes</a>, <a href="#id2798057">Block Mappings</a>, <a href="#id2804923">Core Schema</a></dt>
              <dt xmlns=""><a id="index-entry-presentation"></a>presentation, <a href="#Processing">Processing YAML Information</a>, <a href="#id2763452">Information Models</a>, <a class="preferred" href="#id2766150">Presentation Stream</a>, <a href="#id2769866">Production Parameters</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">detail, <a xmlns="" class="preferred" href="#id2762313">Dump</a>, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2763452">Information Models</a>, <a xmlns="" href="#id2766150">Presentation Stream</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2766934">Scalar Formats</a>, <a xmlns="" href="#id2767100">Comments</a>, <a xmlns="" href="#id2767222">Directives</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2771184">Character Encodings</a>, <a xmlns="" href="#id2774608">Line Break Characters</a>, <a xmlns="" href="#id2776092">Escaped Characters</a>, <a xmlns="" href="#id2777534">Indentation Spaces</a>, <a xmlns="" href="#id2778241">Separation Spaces</a>, <a xmlns="" href="#id2778481">Line Prefixes</a>, <a xmlns="" href="#id2779048">Line Folding</a>, <a xmlns="" href="#id2780069">Comments</a>, <a xmlns="" href="#id2781147">Directives</a>, <a xmlns="" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2786942">Flow Scalar Styles</a>, <a xmlns="" href="#id2794534">Block Chomping Indicator</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-printable character"></a>printable character, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a class="preferred" href="#id2770814">Character Set</a>, <a href="#id2775170">White Space Characters</a>, <a href="#id2776092">Escaped Characters</a>, <a href="#id2788097">Single-Quoted Style</a>, <a href="#id2795688">Literal Style</a></dt>
              <dt xmlns=""><a id="index-entry-processor"></a>processor, <a href="#id2759768">Terminology</a>, <a class="preferred" href="#Processing">Processing YAML Information</a>, <a href="#id2762313">Dump</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2767222">Directives</a>, <a href="#id2767852">Well-Formed Streams and Identified Aliases</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2769542">Available Tags</a>, <a href="#id2770814">Character Set</a>, <a href="#id2771184">Character Encodings</a>, <a href="#id2774608">Line Break Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2780069">Comments</a>, <a href="#id2781147">Directives</a>, <a href="#id2781553">“YAML” Directives</a>, <a href="#id2782457">Tag Handles</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2785586">Node Anchors</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2793979">Block Indentation Indicator</a>, <a href="#id2802346">Failsafe Schema</a>, <a href="#id2803231">JSON Schema</a>, <a href="#id2803828">Integer</a>, <a href="#id2804092">Floating Point</a>, <a href="#id2804356">Tag Resolution</a>, <a href="#id2804923">Core Schema</a>, <a href="#id2805770">Other Schemas</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>R</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-represent"></a>represent, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a class="preferred" href="#id2762313">Dump</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2802662">Generic Sequence</a>, <a href="#id2802842">Generic String</a>, <a href="#id2803362">Null</a>, <a href="#id2803629">Boolean</a>, <a href="#id2803828">Integer</a>, <a href="#id2804092">Floating Point</a>, <a href="#id2805770">Other Schemas</a></dt>
              <dt xmlns=""><a id="index-entry-representation"></a>representation, <a href="#Processing">Processing YAML Information</a>, <a href="#id2762107">Processes</a>, <a href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2763452">Information Models</a>, <a class="preferred" href="#id2763754">Representation Graph</a>, <a href="#id2764044">Nodes</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765410">Serialization Tree</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2767100">Comments</a>, <a href="#id2767222">Directives</a>, <a href="#id2769542">Available Tags</a>, <a href="#id2785586">Node Anchors</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">complete, <a xmlns="" class="preferred" href="#id2767381">Loading Failure Points</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2769212">Recognized and Valid Tags</a>, <a xmlns="" href="#id2769542">Available Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">partial, <a xmlns="" class="preferred" href="#id2767381">Loading Failure Points</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2769212">Recognized and Valid Tags</a>, <a xmlns="" href="#id2803036">Tag Resolution</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-required"></a>required, <a class="preferred" href="#id2759768">Terminology</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>S</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-scalar"></a>scalar, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2760844">Scalars</a>, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2767100">Comments</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2774608">Line Break Characters</a>, <a href="#id2778241">Separation Spaces</a>, <a href="#id2778481">Line Prefixes</a>, <a href="#id2780069">Comments</a>, <a href="#id2786563">Empty Nodes</a>, <a href="#id2794534">Block Chomping Indicator</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2802842">Generic String</a>, <a href="#id2803362">Null</a>, <a href="#id2803629">Boolean</a>, <a href="#id2803828">Integer</a>, <a href="#id2804092">Floating Point</a>, <a href="#id2804356">Tag Resolution</a>, <a href="#id2805071">Tag Resolution</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">canonical form, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2764295">Tags</a>, <a xmlns="" class="preferred" href="#id2764652">Node Comparison</a>, <a xmlns="" href="#id2766934">Scalar Formats</a>, <a xmlns="" href="#id2767381">Loading Failure Points</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">content format, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2764295">Tags</a>, <a xmlns="" href="#id2764652">Node Comparison</a>, <a xmlns="" href="#id2766150">Presentation Stream</a>, <a xmlns="" class="preferred" href="#id2766934">Scalar Formats</a>, <a xmlns="" href="#id2767381">Loading Failure Points</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-schema"></a>schema, <a class="preferred" href="#Schema">Recommended Schemas</a>, <a href="#id2802346">Failsafe Schema</a>, <a href="#id2803231">JSON Schema</a>, <a href="#id2803311">Tags</a>, <a href="#id2804923">Core Schema</a>, <a href="#id2805019">Tags</a>, <a href="#id2805770">Other Schemas</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">core, <a xmlns="" class="preferred" href="#id2804923">Core Schema</a>, <a xmlns="" href="#id2805071">Tag Resolution</a>, <a xmlns="" href="#id2805770">Other Schemas</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">failsafe, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2802346">Failsafe Schema</a>, <a xmlns="" href="#id2803311">Tags</a>, <a xmlns="" href="#id2804356">Tag Resolution</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">JSON, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2803231">JSON Schema</a>, <a xmlns="" href="#id2804356">Tag Resolution</a>, <a xmlns="" href="#id2804923">Core Schema</a>, <a xmlns="" href="#id2805019">Tags</a>, <a xmlns="" href="#id2805071">Tag Resolution</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-sequence"></a>sequence, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2802662">Generic Sequence</a></dt>
              <dt xmlns=""><a id="index-entry-serialization"></a>serialization, <a href="#Processing">Processing YAML Information</a>, <a href="#id2762107">Processes</a>, <a href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2763452">Information Models</a>, <a class="preferred" href="#id2765410">Serialization Tree</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2766446">Node Styles</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2767100">Comments</a>, <a href="#id2767222">Directives</a>, <a href="#id2785586">Node Anchors</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">detail, <a xmlns="" class="preferred" href="#id2762313">Dump</a>, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2763452">Information Models</a>, <a xmlns="" href="#id2765608">Keys Order</a>, <a xmlns="" href="#id2765878">Anchors and Aliases</a>, <a xmlns="" href="#id2785586">Node Anchors</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-serialize"></a>serialize, <a href="#Introduction">Introduction</a>, <a href="#id2708710">Prior Art</a>, <a href="#id2759572">Relation to JSON</a>, <a class="preferred" href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2765608">Keys Order</a>, <a href="#id2765878">Anchors and Aliases</a>, <a href="#id2786196">Alias Nodes</a></dt>
              <dt xmlns=""><a id="index-entry-shall"></a>shall, <a class="preferred" href="#id2759768">Terminology</a></dt>
              <dt xmlns=""><a id="index-entry-space"></a>space, <a href="#id2708710">Prior Art</a>, <a href="#id2760844">Scalars</a>, <a class="preferred" href="#id2775170">White Space Characters</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2779048">Line Folding</a>, <a href="#id2788097">Single-Quoted Style</a>, <a href="#id2788859">Plain Style</a>, <a href="#id2793979">Block Indentation Indicator</a>, <a href="#id2796251">Folded Style</a>, <a href="#id2797382">Block Sequences</a>, <a href="#id2799181">Block Nodes</a>, <a href="#id2800967">Bare Documents</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">indentation, <a xmlns="" href="#Introduction">Introduction</a>, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2759963">Collections</a>, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2763452">Information Models</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2770517">Production Naming Conventions</a>, <a xmlns="" class="preferred" href="#id2777534">Indentation Spaces</a>, <a xmlns="" href="#id2778241">Separation Spaces</a>, <a xmlns="" href="#id2778481">Line Prefixes</a>, <a xmlns="" href="#id2779048">Line Folding</a>, <a xmlns="" href="#id2780069">Comments</a>, <a xmlns="" href="#id2780810">Separation Lines</a>, <a xmlns="" href="#id2781147">Directives</a>, <a xmlns="" href="#Block">Block Styles</a>, <a xmlns="" href="#id2793979">Block Indentation Indicator</a>, <a xmlns="" href="#id2794534">Block Chomping Indicator</a>, <a xmlns="" href="#id2795688">Literal Style</a>, <a xmlns="" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2799181">Block Nodes</a>, <a xmlns="" href="#id2800967">Bare Documents</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">separation, <a xmlns="" class="preferred" href="#id2778241">Separation Spaces</a>, <a xmlns="" href="#id2780069">Comments</a>, <a xmlns="" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2797382">Block Sequences</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">white, <a xmlns="" href="#id2770517">Production Naming Conventions</a>, <a xmlns="" class="preferred" href="#id2775170">White Space Characters</a>, <a xmlns="" href="#id2778241">Separation Spaces</a>, <a xmlns="" href="#id2778481">Line Prefixes</a>, <a xmlns="" href="#id2779048">Line Folding</a>, <a xmlns="" href="#id2780069">Comments</a>, <a xmlns="" href="#id2787109">Double-Quoted Style</a>, <a xmlns="" href="#id2788097">Single-Quoted Style</a>, <a xmlns="" href="#id2788859">Plain Style</a>, <a xmlns="" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2795688">Literal Style</a>, <a xmlns="" href="#id2796251">Folded Style</a>, <a xmlns="" href="#id2797382">Block Sequences</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-stream"></a>stream, <a href="#id2708710">Prior Art</a>, <a href="#Processing">Processing YAML Information</a>, <a href="#id2762107">Processes</a>, <a href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2766150">Presentation Stream</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2767852">Well-Formed Streams and Identified Aliases</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#Syntax">Syntax Conventions</a>, <a href="#id2770814">Character Set</a>, <a href="#id2771184">Character Encodings</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2780069">Comments</a>, <a href="#id2783273">Tag Prefixes</a>, <a href="#id2786563">Empty Nodes</a>, <a href="#id2800132">Documents</a>, <a class="preferred" href="#id2801681">Streams</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">ill-formed, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2767852">Well-Formed Streams and Identified Aliases</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">well-formed, <a xmlns="" href="#id2767852">Well-Formed Streams and Identified Aliases</a>, <a xmlns="" class="preferred" href="#id2801681">Streams</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-style"></a>style, <a href="#id2762313">Dump</a>, <a href="#id2763035">Load</a>, <a href="#id2763452">Information Models</a>, <a href="#id2766150">Presentation Stream</a>, <a class="preferred" href="#id2766446">Node Styles</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2784064">Node Tags</a>, <a href="#id2787109">Double-Quoted Style</a>, <a href="#id2788859">Plain Style</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">block, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2777534">Indentation Spaces</a>, <a xmlns="" class="preferred" href="#Block">Block Styles</a>, <a xmlns="" href="#id2797382">Block Sequences</a></dt>
                  <dd xmlns="http://www.w3.org/1999/xhtml">
                    <dl>
                      <dt>collection, <a xmlns="" href="#id2759963">Collections</a>, <a xmlns="" href="#id2760395">Structures</a>, <a xmlns="" href="#id2777534">Indentation Spaces</a>, <a xmlns="" href="#id2790088">Flow Collection Styles</a>, <a xmlns="" class="preferred" href="#id2797293">Block Collection Styles</a>, <a xmlns="" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                      <dt>folded, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2779048">Line Folding</a>, <a xmlns="" href="#id2793652">Block Scalar Styles</a>, <a xmlns="" href="#id2795688">Literal Style</a>, <a xmlns="" class="preferred" href="#id2796251">Folded Style</a></dt>
                      <dt>literal, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2793652">Block Scalar Styles</a>, <a xmlns="" class="preferred" href="#id2795688">Literal Style</a>, <a xmlns="" href="#id2796251">Folded Style</a></dt>
                      <dt>mapping, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" class="preferred" href="#id2798057">Block Mappings</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                      <dt>scalar, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" class="preferred" href="#id2793652">Block Scalar Styles</a>, <a xmlns="" href="#id2793718">Block Scalar Headers</a>, <a xmlns="" href="#id2793979">Block Indentation Indicator</a>, <a xmlns="" href="#id2794534">Block Chomping Indicator</a></dt>
                      <dt>sequence, <a xmlns="" href="#id2759963">Collections</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" class="preferred" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2798057">Block Mappings</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                    </dl>
                  </dd>
                  <dt xmlns="http://www.w3.org/1999/xhtml">compact block collection, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" class="preferred" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2798057">Block Mappings</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">flow, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2759963">Collections</a>, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2779048">Line Folding</a>, <a xmlns="" class="preferred" href="#Flow">Flow Styles</a>, <a xmlns="" href="#id2790320">Flow Sequences</a>, <a xmlns="" href="#id2792977">Flow Nodes</a>, <a xmlns="" href="#id2799181">Block Nodes</a></dt>
                  <dd xmlns="http://www.w3.org/1999/xhtml">
                    <dl>
                      <dt>collection, <a xmlns="" href="#Syntax">Syntax Conventions</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2775468">Miscellaneous Characters</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2785586">Node Anchors</a>, <a xmlns="" href="#id2788859">Plain Style</a>, <a xmlns="" class="preferred" href="#id2790088">Flow Collection Styles</a></dt>
                      <dt>double-quoted, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#Syntax">Syntax Conventions</a>, <a xmlns="" href="#id2770814">Character Set</a>, <a xmlns="" href="#id2771184">Character Encodings</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2776092">Escaped Characters</a>, <a xmlns="" href="#id2786942">Flow Scalar Styles</a>, <a xmlns="" class="preferred" href="#id2787109">Double-Quoted Style</a>, <a xmlns="" href="#id2792977">Flow Nodes</a></dt>
                      <dt>mapping, <a xmlns="" href="#id2759963">Collections</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" class="preferred" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2798057">Block Mappings</a></dt>
                      <dt>plain, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2786563">Empty Nodes</a>, <a xmlns="" href="#id2786942">Flow Scalar Styles</a>, <a xmlns="" class="preferred" href="#id2788859">Plain Style</a>, <a xmlns="" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2792977">Flow Nodes</a>, <a xmlns="" href="#id2797293">Block Collection Styles</a>, <a xmlns="" href="#id2797382">Block Sequences</a>, <a xmlns="" href="#id2798057">Block Mappings</a>, <a xmlns="" href="#id2799181">Block Nodes</a>, <a xmlns="" href="#id2800401">Document Markers</a>, <a xmlns="" href="#id2804356">Tag Resolution</a>, <a xmlns="" href="#id2805071">Tag Resolution</a></dt>
                      <dt>scalar, <a xmlns="" href="#id2760844">Scalars</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2778481">Line Prefixes</a>, <a xmlns="" href="#id2779048">Line Folding</a>, <a xmlns="" class="preferred" href="#id2786942">Flow Scalar Styles</a></dt>
                      <dt>sequence, <a xmlns="" href="#id2759963">Collections</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" class="preferred" href="#id2790320">Flow Sequences</a>, <a xmlns="" href="#id2790832">Flow Mappings</a></dt>
                      <dt>single-quoted, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2769866">Production Parameters</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2786942">Flow Scalar Styles</a>, <a xmlns="" class="preferred" href="#id2788097">Single-Quoted Style</a></dt>
                    </dl>
                  </dd>
                  <dt xmlns="http://www.w3.org/1999/xhtml">scalar, <a xmlns="" class="preferred" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2776092">Escaped Characters</a>, <a xmlns="" href="#id2778853">Empty Lines</a>, <a xmlns="" href="#id2786942">Flow Scalar Styles</a>, <a xmlns="" href="#id2795688">Literal Style</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">single key:value pair mapping, <a xmlns="" href="#id2765608">Keys Order</a>, <a xmlns="" href="#id2766446">Node Styles</a>, <a xmlns="" href="#id2790320">Flow Sequences</a>, <a xmlns="" class="preferred" href="#id2790832">Flow Mappings</a>, <a xmlns="" href="#id2798057">Block Mappings</a></dt>
                </dl>
              </dd>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>T</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-tab"></a>tab, <a href="#id2708710">Prior Art</a>, <a href="#id2770814">Character Set</a>, <a class="preferred" href="#id2775170">White Space Characters</a>, <a href="#id2777534">Indentation Spaces</a>, <a href="#id2778241">Separation Spaces</a>, <a href="#id2778481">Line Prefixes</a>, <a href="#id2793979">Block Indentation Indicator</a></dt>
              <dt xmlns=""><a id="index-entry-tag"></a>tag, <a href="#id2708710">Prior Art</a>, <a href="#id2761292">Tags</a>, <a href="#id2762313">Dump</a>, <a href="#id2763754">Representation Graph</a>, <a href="#id2764044">Nodes</a>, <a class="preferred" href="#id2764295">Tags</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2766934">Scalar Formats</a>, <a href="#id2767381">Loading Failure Points</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2769212">Recognized and Valid Tags</a>, <a href="#id2769542">Available Tags</a>, <a href="#Syntax">Syntax Conventions</a>, <a href="#id2769866">Production Parameters</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2775468">Miscellaneous Characters</a>, <a href="#id2782090">“TAG” Directives</a>, <a href="#id2783273">Tag Prefixes</a>, <a href="#id2783797">Node Properties</a>, <a href="#id2784064">Node Tags</a>, <a href="#Flow">Flow Styles</a>, <a href="#Schema">Recommended Schemas</a>, <a href="#id2803311">Tags</a>, <a href="#id2805019">Tags</a>, <a href="#id2805770">Other Schemas</a></dt>
              <dd xmlns="">
                <dl>
                  <dt xmlns="http://www.w3.org/1999/xhtml">available, <a xmlns="" class="preferred" href="#id2769542">Available Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">global, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" class="preferred" href="#id2764295">Tags</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2783273">Tag Prefixes</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2805770">Other Schemas</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">handle, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2762107">Processes</a>, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2782090">“TAG” Directives</a>, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2783273">Tag Prefixes</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                  <dd xmlns="http://www.w3.org/1999/xhtml">
                    <dl>
                      <dt>named, <a xmlns="" href="#id2775468">Miscellaneous Characters</a>, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                      <dt>primary, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a></dt>
                      <dt>secondary, <a xmlns="" class="preferred" href="#id2782457">Tag Handles</a></dt>
                    </dl>
                  </dd>
                  <dt xmlns="http://www.w3.org/1999/xhtml">local, <a xmlns="" href="#id2708710">Prior Art</a>, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" class="preferred" href="#id2764295">Tags</a>, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2783273">Tag Prefixes</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2805770">Other Schemas</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">non-specific, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2762313">Dump</a>, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#Schema">Recommended Schemas</a>, <a xmlns="" href="#id2804356">Tag Resolution</a>, <a xmlns="" href="#id2805071">Tag Resolution</a>, <a xmlns="" href="#id2805770">Other Schemas</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">prefix, <a xmlns="" href="#id2782090">“TAG” Directives</a>, <a xmlns="" class="preferred" href="#id2783273">Tag Prefixes</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">property, <a xmlns="" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2772075">Indicator Characters</a>, <a xmlns="" class="preferred" href="#id2784064">Node Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">recognized, <a xmlns="" class="preferred" href="#id2769212">Recognized and Valid Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">repository, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2782457">Tag Handles</a>, <a xmlns="" class="preferred" href="#id2805770">Other Schemas</a></dt>
                  <dd xmlns="http://www.w3.org/1999/xhtml">
                    <dl>
                      <dt>bool, <a xmlns="" class="preferred" href="#id2803629">Boolean</a></dt>
                      <dt>float, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2804092">Floating Point</a></dt>
                      <dt>int, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2803828">Integer</a></dt>
                      <dt>map, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2802432">Generic Mapping</a></dt>
                      <dt>null, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2786563">Empty Nodes</a>, <a xmlns="" class="preferred" href="#id2803362">Null</a></dt>
                      <dt>seq, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2802662">Generic Sequence</a></dt>
                      <dt>str, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" class="preferred" href="#id2802842">Generic String</a></dt>
                    </dl>
                  </dd>
                  <dt xmlns="http://www.w3.org/1999/xhtml">resolution, <a xmlns="" href="#id2764295">Tags</a>, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2786942">Flow Scalar Styles</a>, <a xmlns="" href="#Schema">Recommended Schemas</a>, <a xmlns="" href="#id2803036">Tag Resolution</a>, <a xmlns="" href="#id2804356">Tag Resolution</a>, <a xmlns="" href="#id2805071">Tag Resolution</a>, <a xmlns="" href="#id2805770">Other Schemas</a></dt>
                  <dd xmlns="http://www.w3.org/1999/xhtml">
                    <dl>
                      <dt>convention, <a xmlns="" class="preferred" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2784064">Node Tags</a>, <a xmlns="" href="#id2803036">Tag Resolution</a>, <a xmlns="" href="#id2804356">Tag Resolution</a>, <a xmlns="" href="#id2805071">Tag Resolution</a></dt>
                    </dl>
                  </dd>
                  <dt xmlns="http://www.w3.org/1999/xhtml">shorthand, <a xmlns="" href="#id2761292">Tags</a>, <a xmlns="" href="#id2775468">Miscellaneous Characters</a>, <a xmlns="" href="#id2782090">“TAG” Directives</a>, <a xmlns="" href="#id2782457">Tag Handles</a>, <a xmlns="" href="#id2783273">Tag Prefixes</a>, <a xmlns="" class="preferred" href="#id2784064">Node Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">specific, <a xmlns="" class="preferred" href="#id2768011">Resolved Tags</a>, <a xmlns="" href="#id2784064">Node Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">unavailable, <a xmlns="" href="#id2763035">Load</a>, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2769542">Available Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">unrecognized, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2769212">Recognized and Valid Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">unresolved, <a xmlns="" href="#id2767381">Loading Failure Points</a>, <a xmlns="" class="preferred" href="#id2768011">Resolved Tags</a></dt>
                  <dt xmlns="http://www.w3.org/1999/xhtml">verbatim, <a xmlns="" class="preferred" href="#id2784064">Node Tags</a></dt>
                </dl>
              </dd>
              <dt xmlns=""><a id="index-entry-trimming"></a>trimming, <a class="preferred" href="#id2779048">Line Folding</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>V</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-value"></a>value, <a href="#id2762313">Dump</a>, <a class="preferred" href="#id2764044">Nodes</a>, <a href="#id2764652">Node Comparison</a>, <a href="#id2768011">Resolved Tags</a>, <a href="#id2772075">Indicator Characters</a>, <a href="#id2790832">Flow Mappings</a>, <a href="#id2798057">Block Mappings</a>, <a href="#id2802432">Generic Mapping</a>, <a href="#id2803362">Null</a></dt>
            </dl>
          </div>
          <div class="indexdiv">
            <h3>Y</h3>
            <dl>
              <dt xmlns=""><a id="index-entry-YAML 1.1  processing"></a>YAML 1.1         processing, <a href="#id2774608">Line Break Characters</a>, <a class="preferred" href="#id2781553">“YAML” Directives</a></dt>
            </dl>
          </div>
        </div>
      </div>
    </div>
  <div style="padding: 5px; position: absolute; z-index: 99999999; display: none; top: 5938px; right: auto; bottom: auto; left: 345px; height: auto; width: auto; background-color: rgb(0, 153, 0); font-size: 13px; line-height: 1.2; opacity: 0.9; color: rgb(255, 255, 255);">例2.1。序列标量</div><script src="jsapi" charset="utf-8" type="text/javascript"></script></body>
</html>
